VDrift wiki_vdrift_net_1 http://wiki.vdrift.net/index.php?title=Main_Page MediaWiki 1.35.2 first-letter Media Special Talk User User talk VDrift VDrift talk File File talk MediaWiki MediaWiki talk Template Template talk Help Help talk Category Category talk Main Page 0 1 598 1 2007-02-11T18:41:26Z MediaWiki default 0 wikitext text/x-wiki <big>'''MediaWiki has been successfully installed.'''</big> Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software. == Getting started == * [http://www.mediawiki.org/wiki/Help:Configuration_settings Configuration settings list] * [http://www.mediawiki.org/wiki/Help:FAQ MediaWiki FAQ] * [http://mail.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list] 928e1deea259c70afc3513c66f29f3fcd740d8bf 622 1 2007-06-11T03:10:54Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[General Info]]''' *[[About the project]], [[Community]] *[[Frequently asked questions]] (FAQ) *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] |width="250px"|'''[[Installation]]''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Configuration]]''' *[[Default settings]] *[[Recommended settings]] *[[Command line options]] *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] |width="250px"|'''[[Playing]]''' *[[Starting the game]] *[[Network play]] *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] *[[Lap records]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Files]]''' *[[User settings directory]] *[[VDrift.config]] *[[controls]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] *[[Data directory structure]] |width="250px"|'''[[Development]]''' *[[Release Planning]] *[[Programming methodology]] *[[Class structure]] *[[Coding Guidelines]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Testing]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Cars]]''' *[[List of cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car modeling tutorial]] *[[Importing Racer cars]] |width="250px"|'''[[Tracks]]''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} b9311bd1985e5c665ceb249a2c9e869fc669375e 623 1 2007-06-27T00:59:37Z Venzon 1 /* Welcome */ wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[General Info]]''' *[[About the project]], [[Community]] *[[Frequently asked questions]] (FAQ) *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] |width="250px"|'''[[Installation]]''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Configuration]]''' *[[Default settings]] *[[Recommended settings]] *[[Command line options]] *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] |width="250px"|'''[[Playing]]''' *[[Starting the game]] *[[Network play]] *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] *[[Lap records]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Files]]''' *[[User settings directory]] *[[VDrift.config]] *[[controls]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] *[[Data directory structure]] |width="250px"|'''[[Development]]''' *[[Release Planning]] *[[Programming methodology]] *[[Class structure]] *[[Coding Guidelines]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Testing]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Cars]]''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] *[[Importing Racer cars]] |width="250px"|'''[[Tracks]]''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} 0a7b39af0b5d950a2339fff24289b6754e1f67f2 625 1 2008-05-15T15:49:08Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[General Info]]''' *[[About the project]], [[Community]] *[[Frequently asked questions]] (FAQ) *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] |width="250px"|'''[[Installation]]''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Configuration]]''' *[[Default settings]] *[[Recommended settings]] *[[Command line options]] *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] |width="250px"|'''[[Playing]]''' *[[Starting the game]] *[[Network play]] *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] *[[Lap records]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Files]]''' *[[User settings directory]] *[[VDrift.config]] *[[controls.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] *[[Data directory structure]] |width="250px"|'''[[Development]]''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Testing]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Cars]]''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] *[[Importing Racer cars]] |width="250px"|'''[[Tracks]]''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} 5d4035c73896b23b57ee2305e33d78148161ab3f Old Method of Installing on Windows 0 65 821 2007-02-15T16:55:57Z 87.66.79.197 0 New page: == Download == Download the latest VDrift executable from: [http://sourceforge.net/project/showfiles.php?group_id=137283 this link] Make sure that your are downloading a .exe file. == Ins... wikitext text/x-wiki == Download == Download the latest VDrift executable from: [http://sourceforge.net/project/showfiles.php?group_id=137283 this link] Make sure that your are downloading a .exe file. == Installation == For the installation just double click on the downloaded file. A wizard will start and will ask some simple questions (such as the installation directory). When the wizard ends you can start VDrift from the start menu (if yiu have chosen to install the links in the menu). 1c60b8f02a721e698ac52202a21e7ef5baabeda4 Coding guidelines 0 13 194 193 2007-02-25T17:53:59Z 67.183.220.122 0 /* Code */ wikitext text/x-wiki ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. Commenting Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} 03069dec7dd2f452b02b035091207c234e6e02bb 195 194 2008-05-15T15:16:52Z Venzon 1 /* Indentation and Naming */ wikitext text/x-wiki ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} 92efa79832a58523e2876824f7e6738b3d1d533e 196 195 2008-05-15T19:02:43Z Venzon 1 wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. ==Inheritance== Inheritance is generally discouraged EXCEPT in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, you should have CAR contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if I have a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should NOT know anything about the SETTINGS module and should not access it. The advantage is that now your RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If you later completely rewrite your SETTINGS subsystem, it doesn't (and shouldn't ever) cause you to touch any code in your RENDERER. Your RENDERER is now decoupled from your SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} dda505bf40ce355c49da8b4d0658dff638f94360 197 196 2008-05-15T19:04:29Z Venzon 1 wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. ==Inheritance== Inheritance is generally discouraged [[except]] in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, you should have CAR contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if I have a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should NOT know anything about the SETTINGS module and should not access it. The advantage is that now your RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If you later completely rewrite your SETTINGS subsystem, it doesn't (and shouldn't ever) cause you to touch any code in your RENDERER. Your RENDERER is now decoupled from your SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} 96dded98419d5e07d63707ebb097f1e029b730b5 198 197 2008-05-15T19:05:03Z Venzon 1 wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, you should have CAR contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if I have a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should NOT know anything about the SETTINGS module and should not access it. The advantage is that now your RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If you later completely rewrite your SETTINGS subsystem, it doesn't (and shouldn't ever) cause you to touch any code in your RENDERER. Your RENDERER is now decoupled from your SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} 764f9b88e960f644eba0c9a0fedfda7375a6d4c3 199 198 2008-05-15T19:09:16Z Venzon 1 wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, you should have CAR contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if I have a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should NOT know anything about the SETTINGS module and should not access it. The advantage is that now your RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If you later completely rewrite your SETTINGS subsystem, it doesn't (and shouldn't ever) cause you to touch any code in your RENDERER. Your RENDERER is now decoupled from your SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. ==Testing== Unit testing is encouraged. VDrift comes with the [quicktest.sourceforge.net QuickTest] unit testing framework. To use, simply #include "unittest.h" in your source code implementation files. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} 13e294fc074e9bea0aecc4762de11f1be3aa83af About the project 0 4 25 24 2007-04-06T23:46:55Z Venzon 1 /* History */ wikitext text/x-wiki ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. It's powered by the excellent Vamos physics engine. It is released under the GNU General Public License (GPL) v2. It is currently available for Linux, FreeBSD, Mac OS X and Windows (Cygwin). ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 20 tracks, almost 30 cars * Simple networked multiplayer mode * Very realistic physics * Mouse/joystick/keyboard driven menus * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake lights * Driver aids: automatic shifting, traction control, anti-lock braking * Highly configurable controls ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. fa38fd12df548984257cb0b1377594df9254bff4 26 25 2008-04-04T14:23:50Z Venzon 1 wikitext text/x-wiki ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. It's powered by the excellent Vamos physics engine. It is released under the GNU General Public License (GPL) v2. It is currently available for Linux, FreeBSD, Mac OS X and Windows (Cygwin). ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 20 tracks, almost 30 cars * Simple networked multiplayer mode (currently disabled, waiting to be rewritten) * Very realistic physics * Mouse/joystick/keyboard driven menus * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake lights * Driver aids: automatic shifting, traction control, anti-lock braking * Highly configurable controls ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. 40536be8f2826e7256693fdd9eb976a9000221a0 27 26 2008-04-04T14:24:35Z Venzon 1 wikitext text/x-wiki ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. It's powered by the excellent Vamos physics engine. It is released under the GNU General Public License (GPL) v2. It is currently available for Linux, FreeBSD, Mac OS X and Windows (Cygwin). ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 20 tracks, almost 30 cars * Simple networked multiplayer mode (currently disabled, waiting to be rewritten) * Very realistic physics * Mouse/joystick/keyboard driven menus * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake lights * Driver aids: automatic shifting, traction control, anti-lock braking ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. 4a8c4f9a4b26d879a3ee14fdfeedcdb68695f2a1 Old List of cars 0 57 708 707 2007-04-20T03:04:26Z Venzon 1 wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. * 3S: Mazda 3s sedan * AX2: Fictional Concept Car * C7 * CO: Shelby Cobra * CS: Porsche 911 Clubsport * CT * F1 * FE: Ford Escort MKII Rally * FF: Formula Ford * G4: Ford GT40 * GT: Fictional GT Car * M3 * M7: Mazda RX-7 FC * M8: Mazda RX-8 * MC: Mini Cooper (old style) * MI: Mini Cooper (new style) * NS * RG: Renault 12 Gordini * RS2 * SB: Sand Buggy * T73: Lotus 43 * TC: Toyota Celica ST185 Rally * TL: Toyota Levin * TL2 * XG: BMW 330cxi * XM: BMW M3 SPEED World Challenge * XS: Honda S2000 * Z06 4ad76db02ab1bdffca216733734d58bdd34c50ee Configfile format 0 19 330 329 2007-04-20T14:07:24Z Venzon 1 wikitext text/x-wiki Many of VDrift's text-based data and settings files are written in a format native to the game. In the source code it is the CONFIGFILE class. ==Format== * This format resembles the ini-style format somewhat. * It is not heirarchical, it is categorical. * Whitespace is almost entirely ignored, but line breaks are important. * Comments are lines beginning with '''#'''. * Categories are defined by a heading line with an identifier between '''[''' and ''']''' brackets. * Data items are defined by a line with the form '''''name'' = ''value''''' * Spaces are not allowed in item or category identifiers. * Data values can be almost anything. * Case is important for category and item identifiers, as well as string values, but nothing else. * UTF-8 is not yet supported. ==Parsing== The files are parsed one line at a time. Any characters after a # character are discarded (this is used to allow comments in the file). Characters [ and ] are stripped from the line. If a line has no = character, then the line is interpreted as a heading. Otherwise, the line is interpreted as a setting, with the characters to the left of the = character interpreted as the name of the setting, and the characters to the right of the = character interpreted as the value of the setting. Whitespace before and after the heading, name, or setting is stripped. ==Categories and data items== In this format, categories are defined by a heading of the form <code>[ category ]</code> where ''category'' is the name of the category. Items in the category include all the items from the category heading to the next category heading, or the end of the file. Items before the first category heading have no category. They are referenced by their names preceded by a '''.''' character. ==Example== A file in this format might look like this. name = Example [ first ] stuff = 567 blah = hello radius = 0.555 [ 2nd ] beans = on now = 1 position = 5,6,7 In the file, there are two categories, each with three data items. These items would be referenced by the following identifier strings, in the order they occur: * '''.name''' * '''first.stuff''' * '''first.blah''' * '''first.radius''' * '''2nd.beans''' * '''2nd.now''' * '''2nd.position''' ==How data items' values are typed== The format employs a somewhat loose typing scheme. That is, data items do not need to have their types explicitly defined. In the game code, an item can be queried as any type, and depending on the value of the item, certain values can be interpreted differently when requested as different types. Values can be requested as strings, integers, floating point numbers, a vector of 3 floats, or boolean types. For instance, the item '''2nd.now''' from the example above would have the value ''1'' if interpreted as an integer. If interpreted as a boolean, its value would be ''true''; as a string, its value would be ''"1"''; as a floating-point number, its value would be ''1.0''. The following values will equal ''true'' when interpreted as boolean values: * true * yes * on * 1 The obvious opposite values are equal to ''false''. To have a value interpreted as a vector of 3 floats simply add commas between the three floats: * somevector = 1.0, 2.1, 15 bf3eb3f083aef6d4a4a0f3e8bbee82580f00f7d4 331 330 2007-04-20T14:08:20Z Venzon 1 wikitext text/x-wiki Many of VDrift's text-based data and settings files are written in a format native to the game. In the source code it is the CONFIGFILE class. ==Format== * This format resembles the ini-style format somewhat. * It is not heirarchical, it is categorical. * Whitespace is almost entirely ignored, but line breaks are important. * Comments are lines beginning with '''#'''. * Categories are defined by a heading line with an identifier. The identifier is commonly placed between '''[''' and ''']''' brackets for readability, but this is not actually required. * Data items are defined by a line with the form '''''name'' = ''value''''' * Spaces are allowed in item or category identifiers. * Data values can be almost anything. * Case is important for category and item identifiers, as well as string values, but nothing else. * UTF-8 is not yet supported. ==Parsing== The files are parsed one line at a time. Any characters after a # character are discarded (this is used to allow comments in the file). Characters [ and ] are stripped from the line. If a line has no = character, then the line is interpreted as a heading. Otherwise, the line is interpreted as a setting, with the characters to the left of the = character interpreted as the name of the setting, and the characters to the right of the = character interpreted as the value of the setting. Whitespace before and after the heading, name, or setting is stripped. ==Categories and data items== In this format, categories are defined by a heading of the form <code>[ category ]</code> where ''category'' is the name of the category. Items in the category include all the items from the category heading to the next category heading, or the end of the file. Items before the first category heading have no category. They are referenced by their names preceded by a '''.''' character. ==Example== A file in this format might look like this. name = Example [ first ] stuff = 567 blah = hello radius = 0.555 [ 2nd ] beans = on now = 1 position = 5,6,7 In the file, there are two categories, each with three data items. These items would be referenced by the following identifier strings, in the order they occur: * '''.name''' * '''first.stuff''' * '''first.blah''' * '''first.radius''' * '''2nd.beans''' * '''2nd.now''' * '''2nd.position''' ==How data items' values are typed== The format employs a somewhat loose typing scheme. That is, data items do not need to have their types explicitly defined. In the game code, an item can be queried as any type, and depending on the value of the item, certain values can be interpreted differently when requested as different types. Values can be requested as strings, integers, floating point numbers, a vector of 3 floats, or boolean types. For instance, the item '''2nd.now''' from the example above would have the value ''1'' if interpreted as an integer. If interpreted as a boolean, its value would be ''true''; as a string, its value would be ''"1"''; as a floating-point number, its value would be ''1.0''. The following values will equal ''true'' when interpreted as boolean values: * true * yes * on * 1 The obvious opposite values are equal to ''false''. To have a value interpreted as a vector of 3 floats simply add commas between the three floats: * somevector = 1.0, 2.1, 15 a021ba6cffd11e6d5a3dc0fbd8b16700886fd633 332 331 2007-04-20T14:10:12Z Venzon 1 wikitext text/x-wiki Many of VDrift's text-based data and settings files are written in a format native to the game. In the source code it is the CONFIGFILE class. ==Format== * This format resembles the ini-style format somewhat. * It is not heirarchical, it is categorical. * Comments begin with '''#''' and can occur at any point in a line. * Categories are defined by a heading line with an identifier. The identifier is commonly placed between '''[''' and ''']''' brackets for readability, but this is not actually required. * Data items are defined by a line with the form '''''name'' = ''value''''' * Whitespace before or after an identifier, name, or value is ignored, but line breaks are important. * Spaces are allowed in item or category identifiers and will be preserved. * Data values can be almost anything. * Case is important for category and item identifiers, as well as string values, but nothing else. * UTF-8 is not yet supported. ==Parsing== The files are parsed one line at a time. Any characters after a # character are discarded (this is used to allow comments in the file). Characters [ and ] are stripped from the line. If a line has no = character, then the line is interpreted as a heading. Otherwise, the line is interpreted as a setting, with the characters to the left of the = character interpreted as the name of the setting, and the characters to the right of the = character interpreted as the value of the setting. Whitespace before and after the heading, name, or setting is stripped. ==Categories and data items== In this format, categories are defined by a heading of the form <code>[ category ]</code> where ''category'' is the name of the category. Items in the category include all the items from the category heading to the next category heading, or the end of the file. Items before the first category heading have no category. They are referenced by their names preceded by a '''.''' character. ==Example== A file in this format might look like this. name = Example [ first ] stuff = 567 blah = hello radius = 0.555 [ 2nd ] beans = on now = 1 position = 5,6,7 In the file, there are two categories, each with three data items. These items would be referenced by the following identifier strings, in the order they occur: * '''.name''' * '''first.stuff''' * '''first.blah''' * '''first.radius''' * '''2nd.beans''' * '''2nd.now''' * '''2nd.position''' ==How data items' values are typed== The format employs a somewhat loose typing scheme. That is, data items do not need to have their types explicitly defined. In the game code, an item can be queried as any type, and depending on the value of the item, certain values can be interpreted differently when requested as different types. Values can be requested as strings, integers, floating point numbers, a vector of 3 floats, or boolean types. For instance, the item '''2nd.now''' from the example above would have the value ''1'' if interpreted as an integer. If interpreted as a boolean, its value would be ''true''; as a string, its value would be ''"1"''; as a floating-point number, its value would be ''1.0''. The following values will equal ''true'' when interpreted as boolean values: * true * yes * on * 1 The obvious opposite values are equal to ''false''. To have a value interpreted as a vector of 3 floats simply add commas between the three floats: * somevector = 1.0, 2.1, 15 3aa093d9054b2ea871e61ff2a80437bc2d13c72e 333 332 2007-04-20T14:10:55Z Venzon 1 /* How data items' values are typed */ wikitext text/x-wiki Many of VDrift's text-based data and settings files are written in a format native to the game. In the source code it is the CONFIGFILE class. ==Format== * This format resembles the ini-style format somewhat. * It is not heirarchical, it is categorical. * Comments begin with '''#''' and can occur at any point in a line. * Categories are defined by a heading line with an identifier. The identifier is commonly placed between '''[''' and ''']''' brackets for readability, but this is not actually required. * Data items are defined by a line with the form '''''name'' = ''value''''' * Whitespace before or after an identifier, name, or value is ignored, but line breaks are important. * Spaces are allowed in item or category identifiers and will be preserved. * Data values can be almost anything. * Case is important for category and item identifiers, as well as string values, but nothing else. * UTF-8 is not yet supported. ==Parsing== The files are parsed one line at a time. Any characters after a # character are discarded (this is used to allow comments in the file). Characters [ and ] are stripped from the line. If a line has no = character, then the line is interpreted as a heading. Otherwise, the line is interpreted as a setting, with the characters to the left of the = character interpreted as the name of the setting, and the characters to the right of the = character interpreted as the value of the setting. Whitespace before and after the heading, name, or setting is stripped. ==Categories and data items== In this format, categories are defined by a heading of the form <code>[ category ]</code> where ''category'' is the name of the category. Items in the category include all the items from the category heading to the next category heading, or the end of the file. Items before the first category heading have no category. They are referenced by their names preceded by a '''.''' character. ==Example== A file in this format might look like this. name = Example [ first ] stuff = 567 blah = hello radius = 0.555 [ 2nd ] beans = on now = 1 position = 5,6,7 In the file, there are two categories, each with three data items. These items would be referenced by the following identifier strings, in the order they occur: * '''.name''' * '''first.stuff''' * '''first.blah''' * '''first.radius''' * '''2nd.beans''' * '''2nd.now''' * '''2nd.position''' ==How data items' values are typed== The format employs a somewhat loose typing scheme. That is, data items do not need to have their types explicitly defined. In the game code, an item can be queried as any type, and depending on the value of the item, certain values can be interpreted differently when requested as different types. Values can be requested as strings, integers, floating point numbers, a vector of 3 floats, or boolean types. For instance, the item '''2nd.now''' from the example above would have the value ''1'' if interpreted as an integer. If interpreted as a boolean, its value would be ''true''; as a string, its value would be ''"1"''; as a floating-point number, its value would be ''1.0''. The following values will equal ''true'' when interpreted as boolean values: * true * yes * on * 1 The obvious opposite values are equal to ''false''. To have a value interpreted as a vector of 3 floats simply add commas between the three floats: * somevector = 1.0, 2.1, 4 fc38616f7454f4e0323da3159b9506cf168df748 JOEPack format 0 47 547 2007-04-27T02:15:37Z Venzon 1 New page: This is a simple file format that just crams a bunch of files together, like a zip file, but without any compression. wikitext text/x-wiki This is a simple file format that just crams a bunch of files together, like a zip file, but without any compression. c865501360377aa4f5698b22faadf31bd359bbf6 JOE format 0 48 552 2007-04-27T02:16:21Z Venzon 1 New page: This format is based on the md2 format but with a few enhanced features. It can be written to using a python export script for the Blender 3D modeling package. wikitext text/x-wiki This format is based on the md2 format but with a few enhanced features. It can be written to using a python export script for the Blender 3D modeling package. f673a8630f9b58411809226891f4e53c77fe7b09 Track modeling tutorial 0 83 947 2007-04-27T02:20:43Z Venzon 1 New page: See http://supertuxkart.berlios.de/wiki/index.php/Blender_track_modelling_tutorial wikitext text/x-wiki See http://supertuxkart.berlios.de/wiki/index.php/Blender_track_modelling_tutorial 7d930f9b32afd3617e935be4bd18b49146addec1 948 947 2007-04-27T02:31:22Z Venzon 1 wikitext text/x-wiki See http://supertuxkart.berlios.de/wiki/index.php/Blender_track_modelling_tutorial Also http://forum.rscnet.org/showthread.php?p=3181344 018bf6e7b35368443b0a3506ec6302e736d642fe 949 948 2007-04-27T02:31:32Z Venzon 1 wikitext text/x-wiki See http://supertuxkart.berlios.de/wiki/index.php/Blender_track_modelling_tutorial Also http://forum.rscnet.org/showthread.php?p=3181344 2abd8eb049149d2bee84f861fcffe5c62d63d570 Creating tracks 0 26 420 2007-05-30T05:53:21Z Venzon 1 New page: ==Directions for creating tracks== {{note|These instructions are meant for Linux}} * Model the scene. See the [[track modeling tutorial]] * If you use a 3d editor other than blender, * ... wikitext text/x-wiki ==Directions for creating tracks== {{note|These instructions are meant for Linux}} * Model the scene. See the [[track modeling tutorial]] * If you use a 3d editor other than blender, * Unzip and put racer files in temporary folder RACER_TP (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces). * Create new folder for track in track editor folder TRACKEDITOR_TP. * Convert all texture names to lowercase in TRACKEDITOR_TP via find . -type f -name \*.tga|sort -r|awk '{f=tolower($1); if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh * Make folder TRACKEDITOR_TP/objects/ * Run the following command: dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces. * Open track editor /data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP. Erase VDRIFT_TP/objects/*.joe (since they are in the pack file). * Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to VDrift/gui/tracks/VDRIFT_TP.png (hopefully these png files will be moved into the folders of the individual tracks soon). * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the command mogrify -transparent rgb\(255,0,255\) file.png This can be scripted to speed things up of course. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 8ee91b317a50d8968b2d0deb7523e7f8642d3050 421 420 2007-05-30T05:59:17Z Venzon 1 wikitext text/x-wiki ==Directions for creating tracks== {{note|These instructions are meant for Linux}} * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe (since they are in the pack file). * Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 0a6c98d46b18931e842847756045f5f1c3b6d697 Creating cars 0 25 387 386 2007-06-27T00:52:15Z Venzon 1 /* Car Definition File */ wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being transposed. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 7ebcdffbbb22a2d39b11f5bb44683720713e6c0a Car parameters for vdrift-2009-06-15 and older 0 11 130 2007-06-27T00:55:10Z Venzon 1 New page: The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworl... wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) .... B4 Change of progressivity of stiffness/load (1/kN) ...... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 83fac1c5e08e33027c346c16b2e5cf1e900cb19a 131 130 2007-06-27T00:56:46Z Venzon 1 wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) .... B4 Change of progressivity of stiffness/load (1/kN) ...... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ff9fc11a09a11222a5a3f6ab9a821e5a60173fbe 132 131 2007-06-27T01:03:11Z Venzon 1 wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. The file contains several sections. Each section will now be described, along with example values from the XS.car file. ==Top level parameters== <pre> drive = RWD </pre> The only top level parameter is the "drive" parameter. It accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) .... B4 Change of progressivity of stiffness/load (1/kN) ...... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> effb01727d63d519ff8b5e52faf32d0548357eb8 133 132 2007-06-27T01:07:22Z Venzon 1 wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. The file contains several sections. Each section will now be described, along with example values from the XS.car file. ==Top level parameters== <pre> drive = RWD </pre> The only top level parameter is the "drive" parameter. It accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) .... B4 Change of progressivity of stiffness/load (1/kN) ...... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> 6b634d2ff3060e6c50570da94f7c790f2da77fa1 134 133 2007-06-27T01:32:06Z Venzon 1 wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. The file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Top level parameters== <pre> drive = RWD </pre> The only top level parameter is the "drive" parameter. It accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) .... B4 Change of progressivity of stiffness/load (1/kN) ...... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 2e88afc134f2e8e4b9c1c6d5e27e0568c614f103 135 134 2007-06-27T01:33:04Z Venzon 1 Finished up an initial cut at this section. wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. The file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Top level parameters== <pre> drive = RWD </pre> The only top level parameter is the "drive" parameter. It accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. c37efc2e1502c0f8e3fd1dcb2b8a83be665b9266 136 135 2007-07-19T02:01:30Z Venzon 1 /* Engine */ wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. The file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Top level parameters== <pre> drive = RWD </pre> The only top level parameter is the "drive" parameter. It accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second is fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle) in units of liters. ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 0cc7b1697a5f4b128b143b4e204a603b9891e38c 137 136 2007-07-19T02:02:30Z Venzon 1 /* Engine */ wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. The file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Top level parameters== <pre> drive = RWD </pre> The only top level parameter is the "drive" parameter. It accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 998ef5d018874f6ebe949a454b6242da3578ec0d Compiling VDrift 0 16 225 224 2007-08-04T16:32:34Z Venzon 1 /* Development version */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries can include: * media-libs/openal - The Open Audio Library * media-libs/freealut - The OpenAL Utility Toolkit * media-libs/libsdl - Simple Direct Media Layer * media-libs/sdl-gfx - Graphics drawing primitives library for SDL * media-libs/sdl-image - Image file loading library for SDL * media-libs/sdl-mixer - Simple Direct Media Layer Mixer Library These are Gentoo Portage specific package names. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons] which is written in Python and makes much better sense than autotools in many ways. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enbale more compiler optimizations. scons release=1 ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==OS X== ===Prerequisites=== To use the latest development code, you will need a Subversion client, see [[Getting the development version#Mac OS X]]. The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== '''These are the old instructions, new will follow soon''' ===Prerequisites=== To build VDrift on Windows you'll need [http://www.bloodshed.net/devcpp.html Dev-C++], an IDE (integrated development environment) for Windows that uses the GNU compiler mingw. Download Dev-C++ and install it. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Build=== Start Dev-C++, and with it open the VDrift project file from the VDrift source package, '''tools/win/VDrift.dev'''. Build the project by selecting Compile from the Build menu. 0099207f011547b9bc0df346a237312010656334 229 228 2007-12-17T19:34:11Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries can include: * media-libs/openal - The Open Audio Library * media-libs/freealut - The OpenAL Utility Toolkit * media-libs/libsdl - Simple Direct Media Layer * media-libs/sdl-gfx - Graphics drawing primitives library for SDL * media-libs/sdl-image - Image file loading library for SDL * media-libs/sdl-mixer - Simple Direct Media Layer Mixer Library * sdl-net Bullet is required for physics and is included in the source. On linux it can be installed like this: * cd bullet-2.64 * ./configure * jam bulletcollision bulletmath That should put the bullet libraries into a spot in the bullet-2.64 tree that the VDrift scons files are expecting them. Then just compile vdrift normally. These are Gentoo Portage specific package names. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons] which is written in Python and makes much better sense than autotools in many ways. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enbale more compiler optimizations. scons release=1 ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==OS X== ===Prerequisites=== To use the latest development code, you will need a Subversion client, see [[Getting the development version#Mac OS X]]. The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== These directions have been verified to work, starting from scratch, as of source revision R1888. ===Prerequisites=== To build VDrift on Windows you'll need working installations of mingw, MSYS, python, and scons. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Build=== From the folder where you put the VDrift source: cp tools/win/bin/jam.exe /bin cd bullet-2.64 ./configure export JAM_TOOLSET=MINGW jam bulletcollision bulletmath jam bulletcollision bulletmath (yes, I had to run the command twice to get it to work) cd .. scons Next you'll need to: Created a vdrift-runtime folder copied build/vdrift.exe file to the runtime folder copied tools/win/dll/*.dll to the runtime folder checked out the data repository into the runtime folder f3fa963746c237c4ab6887bd18730ca37dcf9d1c 230 229 2007-12-17T19:35:12Z Venzon 1 /* Build */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries can include: * media-libs/openal - The Open Audio Library * media-libs/freealut - The OpenAL Utility Toolkit * media-libs/libsdl - Simple Direct Media Layer * media-libs/sdl-gfx - Graphics drawing primitives library for SDL * media-libs/sdl-image - Image file loading library for SDL * media-libs/sdl-mixer - Simple Direct Media Layer Mixer Library * sdl-net Bullet is required for physics and is included in the source. On linux it can be installed like this: * cd bullet-2.64 * ./configure * jam bulletcollision bulletmath That should put the bullet libraries into a spot in the bullet-2.64 tree that the VDrift scons files are expecting them. Then just compile vdrift normally. These are Gentoo Portage specific package names. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons] which is written in Python and makes much better sense than autotools in many ways. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enbale more compiler optimizations. scons release=1 ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==OS X== ===Prerequisites=== To use the latest development code, you will need a Subversion client, see [[Getting the development version#Mac OS X]]. The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== These directions have been verified to work, starting from scratch, as of source revision R1888. ===Prerequisites=== To build VDrift on Windows you'll need working installations of mingw, MSYS, python, and scons. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Build=== From the folder where you put the VDrift source: cp tools/win/bin/jam.exe /bin cd bullet-2.64 ./configure export JAM_TOOLSET=MINGW jam bulletcollision bulletmath jam bulletcollision bulletmath (yes, I had to run the command twice to get it to work) cd .. scons Next you'll need to: * Create a vdrift-runtime folder * Copy build/vdrift.exe file to the runtime folder * Copy tools/win/dll/*.dll to the runtime folder * Check out the data repository into the runtime folder under data/ 8132fa03b161f475610b362524494fd1c4357478 231 230 2007-12-27T06:21:52Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. Bullet is required for physics and is included in the source. On linux it can be installed like this: * cd bullet-2.64 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.64 tree that the VDrift build files are expecting (in either bullet-2.64/out/linuxx86/optimize/libs or bullet-2.64/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enbale more compiler optimizations. scons release=1 ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==OS X== ===Prerequisites=== To use the latest development code, you will need a Subversion client, see [[Getting the development version#Mac OS X]]. The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== These directions have been verified to work, starting from scratch, as of source revision R1888. ===Prerequisites=== To build VDrift on Windows you'll need working installations of mingw, MSYS, python, and scons. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Build=== From the folder where you put the VDrift source: cp tools/win/bin/jam.exe /bin cd bullet-2.64 ./configure export JAM_TOOLSET=MINGW jam bulletcollision bulletmath jam bulletcollision bulletmath (yes, I had to run the command twice to get it to work) cd .. scons Next you'll need to: * Create a vdrift-runtime folder * Copy build/vdrift.exe file to the runtime folder * Copy tools/win/dll/*.dll to the runtime folder * Check out the data repository into the runtime folder under data/ 135d7330e07e7f66547ae8f25cc042d44f653baf 232 231 2007-12-28T17:08:11Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. Bullet is required for physics and is included in the source. On linux it can be installed like this: * cd bullet-2.64 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.64 tree that the VDrift build files are expecting (in either bullet-2.64/out/linuxx86/optimize/libs or bullet-2.64/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enbale more compiler optimizations. scons release=1 ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==OS X== ===Prerequisites=== To use the latest development code, you will need a Subversion client, see [[Getting the development version#Mac OS X]]. The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== These directions have been verified to work, starting from scratch, as of source revision R1888. ===Prerequisites=== To build VDrift on Windows you'll need working installations of mingw, MSYS, python, and scons. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Build=== Launch MSYS and change directories to the folder where you put the VDrift source. Do the following: cp tools/win/bin/jam.exe /bin cd bullet-2.64 ./configure export JAM_TOOLSET=MINGW jam bulletcollision bulletmath jam bulletcollision bulletmath (yes, I had to run the command twice to get it to work) cd .. scons Next you'll need to: * Create a vdrift-runtime folder * Copy build/vdrift.exe file to the runtime folder * Copy tools/win/dll/*.dll to the runtime folder * Check out the data repository into the runtime folder under data/ 76f304a39aa6cdd45b30cabb4e0e6ed8b2d56ff6 233 232 2007-12-28T17:09:33Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. Bullet is required for physics and is included in the source. On linux it can be installed like this: * cd bullet-2.64 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.64 tree that the VDrift build files are expecting (in either bullet-2.64/out/linuxx86/optimize/libs or bullet-2.64/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enbale more compiler optimizations. scons release=1 ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==OS X== ===Prerequisites=== To use the latest development code, you will need a Subversion client, see [[Getting the development version#Mac OS X]]. The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== These directions have been verified to work, starting from scratch, as of source revision R1888. ===Prerequisites=== To build VDrift on Windows you'll need working installations of mingw, MSYS, python, and scons. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Build=== Launch MSYS and change directories to the folder where you put the VDrift source. Do the following: cp tools/win/bin/jam.exe /bin cd bullet-2.64 ./configure export JAM_TOOLSET=MINGW jam bulletcollision bulletmath jam bulletcollision bulletmath (yes, I had to run the command twice to get it to work) cd .. scons Note that the jam bulletcollision bulletmath sometimes gives errors, but will usually build the libraries VDrift needs anyway. Next you'll need to: * Create a vdrift-runtime folder * Copy build/vdrift.exe file to the runtime folder * Copy tools/win/dll/*.dll to the runtime folder * Check out the data repository into the runtime folder under data/ 5173438c72429746d5bf8e7ed547ddc1475bb4ff Working with the development version 0 90 1062 1061 2007-08-04T16:35:01Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. ===Mac OSX=== This is the same as working with Linux/UNIX as above however Mac OSX does not ship with a SVN client from Apple. You will need to obtain an SVN client. If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it with "svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift" and link vdrift-data to the vdrift/data from svn.vdrift.net ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 685acfd9656b66c8149e80860fde89bf9399bbd1 1065 1064 2007-12-09T00:13:51Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/repos/vdrift/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. ===Mac OSX=== This is the same as working with Linux/UNIX as above however Mac OSX does not ship with a SVN client from Apple. You will need to obtain an SVN client. If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 85551c290ed841d9d95357ba3415cb9a5e9d823b Community 0 14 207 206 2007-09-15T05:23:43Z Venzon 1 wikitext text/x-wiki The VDrift community is an always expanding world of open source game developers, gamers on all platforms, artists and designers, and car tuners. It is based totally on the internet. ==World Wide Web== VDrift has several web sites devoted to the project and development. They are: * [http://vdrift.net/ vdrift.net] - The main project web site, includes news and forums, and general project information. ** The project forums are where most development discussion and user support goes on. * [http://sourceforge.net/projects/vdrift sf.net/projects/vdrift] - VDrift downloads are hosted on SourceForge, as well as the data repository, and the development mailing list. * [http://wiki.vdrift.net/ wiki.vdrift.net] - The VDrift Wiki is the home of all the project's documentation. * [http://svn.vdrift.net/ svn.vdrift.net] - This includes a public browser for the main VDrift Subversion tree, as well as HTTP access to the tree itself. * trac.vdrift.net - This new site will be the home of VDrift issue tracking and possibly the new location of the Subversion browser. ==Internet Relay Chat (IRC)== VDrift has its own channel on [http://freenode.net/ Freenode], a major IRC network composed mostly of free software projects. * Server: '''irc.freenode.net''' * Channel: '''#vdrift''' This channel is used both for developer discussion and user support. If you have a problem or question feel free to stop by and ask. {{note|Developers often stay logged in to the channel all the time, but may be away from their computer. If you ask a question, please stay in the channel and wait for an answer. Many people join the channel, ask a question, and since no one responds, they think no one wants to answer them, so they leave. Sometimes it'll take an hour or two before a developer will be at the keyboard. If you can't hang around, either make a post on the VDrift forum or leave an e-mail address where we can respond.}} ==Mailing Lists== The project has just one mailing list that is only seldom used, for development purposes only. '''Do not ask for help/support on this list, use the forums.''' You can visit the [http://sourceforge.net/mailarchive/forum.php?forum_name=vdrift-devel vdrift-devel archives] on SourceForge. This mailing list is mostly only used when developers want to make sure that other developers see something, since not everyone visits the forum every day. It is also used when the forum format falls short, for instance it is easier (and sometimes more appropriate) to attach files to an e-mail than find somewhere to host them and post a link on the forums. 6fc45f193758be7f9c65685c368ab8d38172c928 Authors and contributors 0 6 42 41 2007-12-18T20:24:05Z Venzon 1 /* Cars */ wikitext text/x-wiki ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to write nearly all the source code for the game, and created everything in the game which is not attributed to someone else below. The physics engine in the game is the [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. ==Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. * rookie1 wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helps with testing and debugging, and has provided help improving the build system. He's also written a much improved error logging system which is not in use yet. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * cotharyus has improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 TF] created the 360 ====Tracks==== * alexr has imported several very good tracks. * pwp71 has helped update many older tracks' parameters as new track features have become available. ==Ports== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] ported VDrift to Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] manages the VDrift port for FreeBSD. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] manages the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. ==Packagers== * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] has packaged VDrift for Slackware Linux and has helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] and Gonéri Le Bouder have both worked on Debian GNU/Linux packages for VDrift. abc1822571db42de57082137df40a3afc7d9b636 Hardware requirements 0 38 513 2007-12-26T18:13:13Z Venzon 1 New page: VDrift requires a relatively fast CPU. 2GHz recommended, although you may be able to squeak by with a 1GHz CPU. VDrift also requires a recent NVidia or ATI graphics card. A Geforce 7 se... wikitext text/x-wiki VDrift requires a relatively fast CPU. 2GHz recommended, although you may be able to squeak by with a 1GHz CPU. VDrift also requires a recent NVidia or ATI graphics card. A Geforce 7 series or better (or the equivalent ATI card) is recommended if you want all visual effects, although you might be able to get by with a Geforce 2 or better. Intel graphics cards are not recommended and are not supported. d70c57f701e3a38bf4352091060a3bc646a4b363 514 513 2007-12-26T18:14:00Z Venzon 1 wikitext text/x-wiki VDrift requires a relatively fast CPU. A 2GHz or better clock speed is recommended, although you may be able to squeak by with a 1GHz or better CPU. VDrift requires a recent NVidia or ATI graphics card. A Geforce 7 series or better (or the equivalent ATI card) is recommended if you want all visual effects, although you might be able to get by with a Geforce 2 or better. Intel graphics cards are not recommended and are not supported. Make sure you have the latest drivers and can run other OpenGL applications. 3303ec3e9eb8d62b14da0e4c1c3901f6a136256f Software requirements 0 77 900 899 2007-12-26T18:16:47Z Venzon 1 wikitext text/x-wiki ==Linux== ===Libraries=== ====Latest Release (2007-03-23)==== To install VDrift on Linux you must first install these dependencies: * [http://www.libsdl.org/ SDL] * SDL-image * SDL-gfx * SDL-net * [http://openal.org/ OpenAL] * OpenAL Utility Toolkit, (ALUT) * OpenGL device drivers To compile VDrift on Linux the header files for these libraries are also required. They are usually found in "-dev" packages, consult your distristribution's documentation for this. ====Current SVN version==== For the latest version the OpenAL and ALUT dependencies has been removed. In its place you will need SDL-sound and Vorbis. Also, the [http://www.bulletphysics.com/ Bullet Physics Library] is required. It's recommended that you use the bullet distribution included in the VDrift release. ===Build Tools=== To compile VDrift, you'll also need * [http://gcc.gnu.org/ gcc] 3.2 or above * [http://www.scons.org/ SCons] 08b54404e1348b5b001399db5c5585b8aa344f13 902 900 2008-04-04T14:15:35Z Venzon 1 wikitext text/x-wiki ==Linux== ===Libraries=== ====Latest Release (2007-12-26)==== To install VDrift on Linux you must first install these dependencies: * [http://www.libsdl.org/ SDL] * SDL-image * SDL-gfx * SDL-net * OpenGL device drivers * [http://xiph.org/vorbis/ Vorbis] * [http://www.bulletphysics.com/ Bullet Physics Library] (included in the VDrift release) To compile VDrift on Linux the header files for these libraries are also required. They are usually found in "-dev" packages, consult your distristribution's documentation for this. ===Build Tools=== To compile VDrift, you'll also need * [http://gcc.gnu.org/ gcc] 3.2 or above * [http://www.scons.org/ SCons] 8893ac2cc65c6e3d64e0c0c2b9b576de064a6c73 Drift scoring 0 29 451 449 2008-05-15T17:07:50Z Venzon 1 wikitext text/x-wiki ==Overview== In Practice Game mode, player's drift score is displayed at the upper right-hand corner of the screen. ==Start/end of scoring== The game starts drift scoring when a car satisfies the following conditions, # At least '''2''' of the wheels are on track, and # Car speed is above '''10 m/s''', and # The drift angle (angle between car's orientation and its velocity direction) is more than '''0.2 radian''' (about 11.5 degrees), and less than '''PI/2''' (i.e. spin out) The drift scoring ends when either one the following occurs, # Less than '''2''' wheels are on track, or # Car speed is less than '''10 m/s''', or # The drift angle is less than '''0.1 radian''' (about 5.7 degrees) ==Scoring rules== At the begin of a drift, the game starts accumulating the score for this drift. At the end of a drift, the accumulated score is added to the total score. The accumulated score consists of base score and bonus score. # '''Base score''' - This is simply the length the car has traveled in this drift (in meters). A longer drift will earn higher base score. # '''Bonus score''' - This contains 3 components, #* '''drift length bonus''' - same value as the base score, effectively giving double bonus to longer drifts. #* '''max_drift_speed bonus''' - the value is max_drift_speed (in m/s) / 2, e.g. a max_drift_speed of 20 m/s will earn a bonus of 10. #* '''max_drift_angle bonus''' - the value is max_drift_angle (in radian) * 40 / PI, e.g. a max_drift_angle of PI/4 (45 degrees) will earn a bonus of 10. The max_drift_angle value in degrees is displayed next to the drift score during a drift. If the car goes off track or spin out during a drift, the accumulated drift score is not added to the total score. An accumulated drift score of less than 5 is not added to the total either. ba1e82615537e5ac8c4f7635cb88cecf1e4d671a Coding guidelines 0 13 200 199 2008-05-15T19:09:46Z Venzon 1 wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, you should have CAR contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if I have a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should NOT know anything about the SETTINGS module and should not access it. The advantage is that now your RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If you later completely rewrite your SETTINGS subsystem, it doesn't (and shouldn't ever) cause you to touch any code in your RENDERER. Your RENDERER is now decoupled from your SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. ==Testing== Unit testing is encouraged. VDrift comes with the [http://quicktest.sourceforge.net QuickTest] unit testing framework. To use, simply #include "unittest.h" in your source code implementation files. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} 82e4cbabb4601c4ed3214530e838fdaa77a705a7 201 200 2008-05-15T23:42:52Z Venzon 1 wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not over use comments. Only comment code that has side effects, is not clear at first glance, or that does complex operations. It is ok to comment a section of code with a comment describing what that section does. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, the CAR should contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if there is a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should ''not'' know anything about the SETTINGS module and should not access it. The advantage is that now the RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If the SETTINGS subsystem is later rewritten, it doesn't (and shouldn't ever) cause any changes to code in the RENDERER. The RENDERER is now decoupled from the SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. ==Testing== Unit testing is encouraged. VDrift comes with the [http://quicktest.sourceforge.net QuickTest] unit testing framework. To use, simply #include "unittest.h" in your source code implementation files. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} 85d22698d89c331f7e290aa4f2fbb598dadfd504 Main Page 0 1 626 1 2008-05-20T02:52:45Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[General Info]]''' *[[About the project]], [[Community]] *[[Frequently asked questions]] (FAQ) *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] |width="250px"|'''[[Installation]]''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Configuration]]''' *[[Default settings]] *[[Recommended settings]] *[[Command line options]] *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] |width="250px"|'''[[Playing]]''' *[[Starting the game]] *[[Network play]] *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] *[[Lap records]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Files]]''' *[[User settings directory]] *[[VDrift.config]] *[[controls.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] *[[Data directory structure]] |width="250px"|'''[[Development]]''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Testing]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Cars]]''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] *[[Importing Racer cars]] |width="250px"|'''[[Tracks]]''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} 0e242281f8bdc4befb7cd531fd5d70ef0c74173b 627 1 2008-07-26T22:55:42Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[General Info]]''' *[[About the project]], [[Community]] *[[Frequently asked questions]] (FAQ) *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] |width="250px"|'''[[Installation]]''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] *[[2008 Refactor Project]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Configuration]]''' *[[Default settings]] *[[Recommended settings]] *[[Command line options]] *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] |width="250px"|'''[[Playing]]''' *[[Starting the game]] *[[Network play]] *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] *[[Lap records]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Files]]''' *[[User settings directory]] *[[VDrift.config]] *[[controls.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] *[[Data directory structure]] |width="250px"|'''[[Development]]''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Testing]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Cars]]''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] *[[Importing Racer cars]] |width="250px"|'''[[Tracks]]''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} 6cd2e27fcac4efb1369c802f9c3067d321b827c2 628 1 2008-07-26T22:55:58Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[General Info]]''' *[[About the project]], [[Community]] *[[Frequently asked questions]] (FAQ) *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''[[Installation]]''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Configuration]]''' *[[Default settings]] *[[Recommended settings]] *[[Command line options]] *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] |width="250px"|'''[[Playing]]''' *[[Starting the game]] *[[Network play]] *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] *[[Lap records]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Files]]''' *[[User settings directory]] *[[VDrift.config]] *[[controls.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] *[[Data directory structure]] |width="250px"|'''[[Development]]''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Testing]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[Cars]]''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] *[[Importing Racer cars]] |width="250px"|'''[[Tracks]]''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} e2ef079ebcdf1c389a027ad2c1601604060a6885 Numerical Integration 0 55 652 2008-05-20T03:01:37Z Venzon 1 New page: Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calcu... wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before its error becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Euler Integration== :<math> y_{n+1} = y_n + hf(t_n,y_n). \qquad \qquad</math> ==Newton-Stormer-Verlet (NSV) Symplectic Euler== ==Runge Kutta 4== ==Velocity Verlet== 4f5e73512ba3ee535b03a6bb1c32d76724cfc968 653 652 2008-05-20T03:07:48Z Venzon 1 wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before its error becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Euler Integration== a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt 8e1a5537efa2f9bcc8cd0b3cbba99e86e27a4691 654 653 2008-05-20T03:19:57Z Venzon 1 wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability and accuracy are both reasonably good. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== b09f663a83aaa9d5ec2a44cddd58c7f875decb91 655 654 2008-05-20T03:21:54Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability and accuracy are both reasonably good. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== [[Image:M250a1k200dt01t20.pdf-cropped.png]] 94b19ec8cd369dbb500a980855860153a84d7ee0 656 655 2008-05-20T03:27:46Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability and accuracy are both reasonably good. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. 7f1346c0a0674a446f97a0b66f26bda1c7e0f5f3 657 656 2008-05-20T03:28:00Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability and accuracy are both reasonably good. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. 0de1efbb2bcdee882da49646617490e0ebe5dbcf 658 657 2008-05-20T05:11:03Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability and accuracy are both reasonably good. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are similar. [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. 19f857e88cb7b7576cb417cf7e06c1f89d435e9e 659 658 2008-05-20T05:11:45Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability and accuracy are both reasonably good. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. 844895feb56823a8cc7c7723d06ac58092e6c315 660 659 2008-05-20T05:12:28Z Venzon 1 /* Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is good, and accuracy is excellent. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. 2be44262c5788cdb4de9d8ea8d95f6b93dbf6fab 661 660 2008-05-20T05:13:21Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is good, and accuracy is excellent. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] [[Image:M250a1k100000dt01t200.pdf.png]] [[Image:M250a1k1000000dt01t20.pdf.png]] 32e3110f8725e9910cecd298bdc0ad76fb4e3dba 662 661 2008-05-20T05:16:38Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is good, and accuracy is excellent. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] After 200 seconds, [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. 4d1a9706b0505d2fa5c956423fb5ceb1f988fc6c 663 662 2008-05-20T05:17:42Z Venzon 1 /* Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is good, and accuracy is excellent. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== 5fc7089e7146698bf45542e9747db0f92ffc68cd 664 663 2008-05-20T05:21:46Z Venzon 1 /* Summary */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is good, and accuracy is excellent. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| border="1" |Method |Stability |Accuracy |Performance |- |Euler |Poor |Poor |Excellent |- |NSV |Fair |Excellent |Excellent |- |RK4 |Excellent |Fair |Poor |- |Velocity Verlet |Excellent |Excellent |Excellent |} c33c258d53494d95e1a0b7bdc7a83d714b6ef3a6 665 664 2008-05-20T05:22:12Z Venzon 1 /* Summary */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is good, and accuracy is excellent. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is good, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration degrades its accuracy. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is merely good. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" |Method |Stability |Accuracy |Performance |- |Euler |Poor |Poor |Excellent |- |NSV |Fair |Excellent |Excellent |- |RK4 |Excellent |Fair |Poor |- |Velocity Verlet |Excellent |Excellent |Excellent |} 4a64de4921daa6ef913f98480395cc1a267fd05a 666 665 2008-05-20T05:30:56Z Venzon 1 wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. c3dec6416db7ca8b5f8add5804f405163dace888 667 666 2008-05-20T14:25:24Z Venzon 1 /* Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity. Using the velocity from the last iteration to calculate the acceleration may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 87113c1d6feb321a2065f3200e64650141ad80d0 668 667 2008-05-20T14:26:43Z Venzon 1 /* Velocity Verlet */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. b638623e0919931443941b2e5d5403bb56d425bb 669 668 2008-05-20T14:27:24Z Venzon 1 /* Velocity Verlet */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be exactly solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The exact solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 64eaf3491b77197f043b031d4036691a120d4632 670 669 2008-05-20T14:29:13Z Venzon 1 /* Detailed Comparison */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 91129cff9fd125dbaf3275183c3168a823929de4 671 670 2008-05-21T02:23:23Z Venzon 1 wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a; [[Image:Damped-m250a1k10000dt01t10.png]] [[Image:Damped-m250a1k15000dt01t10.png]] ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 38984b5f12a366ce82e880d25495ff2ec2faf3d8 672 671 2008-05-21T02:24:28Z Venzon 1 /* Velocity Verlet */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a; [[Image:Damped-m250a1k10000dt01t10.png]] [[Image:Damped-m250a1k15000dt01t10.png]] ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 107b4434186faf47f9771c59ec7bf6536fb75161 673 672 2008-05-21T02:29:38Z Venzon 1 /* Detailed Comparison: spring-mass-damper */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the Velocity Verlet and Modified Velocity Verlet algorithms both becoming unstable. The NSV is starting to show major inaccuracies, but is not unstable. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 22a8cfa3c6ee0074e2446750d678c933e4e4151e 674 673 2008-05-21T02:43:06Z Venzon 1 wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the Velocity Verlet and Modified Velocity Verlet algorithms both becoming unstable. The NSV is starting to show major inaccuracies, but is not unstable. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. c5c2ac8e4f592849514d6df4a9d5262fa896f35a 675 674 2008-05-21T02:44:55Z Venzon 1 wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies, but it is not yet unstable. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. cbf83f870798810eab4deb6dc1d1da46bfa1edc5 676 675 2008-05-21T02:47:17Z Venzon 1 wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies, but it is not yet unstable. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 590293411d3434bcdcfdfa8ec5765f85d1692d21 677 676 2008-05-21T02:53:20Z Venzon 1 /* Detailed Comparison: spring-mass-damper */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. d2172bf03901b135fc1f591cc35b86e3588d9ab9 678 677 2008-05-21T02:55:17Z Venzon 1 /* Summary */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator. The rankings are based on when the method becomes unstable. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |3 |2 |- !NSV |2 |4 |- !RK4 |1 |1 |- !Modified Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Each method is ranked by the three criteria as Excellent, Fair, or Poor: {| cellspacing="0" border="1" !Method !Stability !Accuracy !Performance |- !Euler |Poor |Poor |Excellent |- !NSV |Fair |Excellent |Excellent |- !RK4 |Excellent |Fair |Poor |- !Velocity Verlet |Excellent |Excellent |Fair |} Both the NSV and Velocity Verlet algorithms are good choices for realtime dynamics simulations. For the Velocity Verlet algorithm to perform as well as it did in this example, the acceleration must be derived from the position only and not the velocity. If force calculations require velocity (such as a damper), then one must make sure one understands the implications of using the last velocity to calculate forces, as it may degrade the algorithm's accuracy. 7abc05d9cb7937ca10e64955de73be91d4d361d8 679 678 2008-05-21T03:09:23Z Venzon 1 /* Summary */ wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== the Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. cb3d2bfc37dfa595031d5079582269f683b396f7 2008 Refactor Project 0 2 2 2008-07-26T23:03:06Z Venzon 1 New page: ==Overview== Hacking on VDrift has been getting harder and harder. Each new feature that is added requires more work and makes it that much more difficult to add the next feature. So, a ma... wikitext text/x-wiki ==Overview== Hacking on VDrift has been getting harder and harder. Each new feature that is added requires more work and makes it that much more difficult to add the next feature. So, a major code refactor/rewrite was begun in April 2008. One side effect of this effort is that any new bugs or feature suggestions will be put in the issues system as future "to do" items and probably won't be addressed until after the refactor is complete. ==Trying out the refactor== The refactor uses the same data repository, so use the existing information on [[Getting_the_development_version#Checking_out_the_data|checking out the data]]. If you have already checked out the data, simply update from SVN to ensure you're up to date. Use the normal SVN checkout procedure as explained in [[Getting_the_development_version]], but use the following SVN path for the code: http://svn.vdrift.net/repos/vdrift/branches/refactor2008 9c31381bade187a31c6284676ab7ae096e6690a4 3 2 2008-07-26T23:05:05Z Venzon 1 /* Trying out the refactor */ wikitext text/x-wiki ==Overview== Hacking on VDrift has been getting harder and harder. Each new feature that is added requires more work and makes it that much more difficult to add the next feature. So, a major code refactor/rewrite was begun in April 2008. One side effect of this effort is that any new bugs or feature suggestions will be put in the issues system as future "to do" items and probably won't be addressed until after the refactor is complete. ==Trying out the refactor== The refactor uses the same data repository as the trunk, so use the existing information on [[Getting_the_development_version#Checking_out_the_data|checking out the data]]. If you have already checked out the data, simply update from SVN to ensure you're up to date. Use the normal SVN checkout procedure as explained in [[Getting_the_development_version]], but use the following SVN path for the code: http://svn.vdrift.net/repos/vdrift/branches/refactor2008 4c94b626605780b8507d7d3a794f2739e5dab119 4 3 2008-07-26T23:06:44Z Venzon 1 /* Trying out the refactor */ wikitext text/x-wiki ==Overview== Hacking on VDrift has been getting harder and harder. Each new feature that is added requires more work and makes it that much more difficult to add the next feature. So, a major code refactor/rewrite was begun in April 2008. One side effect of this effort is that any new bugs or feature suggestions will be put in the issues system as future "to do" items and probably won't be addressed until after the refactor is complete. ==Trying out the refactor== The refactor uses the same data repository as the trunk, so use the existing information on [[Getting_the_development_version#Checking_out_the_data|checking out the data]]. If you have already checked out the data, simply update from SVN to ensure you're up to date. Use the normal SVN checkout procedure as explained in [[Getting_the_development_version]], but use the following SVN path for the code: http://svn.vdrift.net/repos/vdrift/branches/refactor2008 Bullet is included in the repository as a .tgz archive. Unzip and untar the archive, then rename the bullet folder to bullet-2.68. b998db8a1738aa81543f04437c14bf8115a981e3 Authors and contributors 0 6 43 42 2008-07-26T23:10:27Z Venzon 1 wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to write nearly all the source code for the game, and created everything in the game which is not attributed to someone else below. The physics engine in the game is the [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. ==Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. * rookie1 wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helps with testing and debugging, and has provided help improving the build system. He's also written a much improved error logging system which is not in use yet. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * cotharyus has improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 TF] created the 360 ====Tracks==== * alexr has imported several very good tracks. * pwp71 has helped update many older tracks' parameters as new track features have become available. ==Ports== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] ported VDrift to Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] manages the VDrift port for FreeBSD. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] manages the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. ==Packagers== * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] has packaged VDrift for Slackware Linux and has helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] and Gonéri Le Bouder have both worked on Debian GNU/Linux packages for VDrift. 7a1788f2a498d127dbe7223903109f87591891f9 Compiling VDrift 0 16 243 242 2008-08-06T00:41:09Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. Bullet is required for physics and is included in the source. On linux it can be installed like this: * cd bullet-2.66 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.66 tree that the VDrift build files are expecting (in either bullet-2.66/out/linuxx86/optimize/libs or bullet-2.66/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 1e67cd39847b773de9d1fc6fc259779e39a4e8ea 245 243 2008-10-03T14:15:56Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution. On linux it can be compiled like this: * cd bullet-2.66 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.66 tree that the VDrift build files are expecting (in either bullet-2.66/out/linuxx86/optimize/libs or bullet-2.66/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== To install, use the SCons build target '''install'''. This command must be run as root. scons install ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. e7e6fe5319a51d365b5d20a15d676b5ec485a8a3 246 245 2008-10-03T14:19:03Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution. On linux it can be compiled like this: * cd bullet-2.66 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.66 tree that the VDrift build files are expecting (in either bullet-2.66/out/linuxx86/optimize/libs or bullet-2.66/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may omit installing needed datafiles. If scons install doesn't result in a working installation, you may need to manually copy the files in VDrift's data folder into the installed data location.}} ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. cef38466c954c3caa944536babae4b9a5053c40c 247 246 2008-10-03T14:19:56Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution. On linux it can be compiled like this: * cd bullet-2.66 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.66 tree that the VDrift build files are expecting (in either bullet-2.66/out/linuxx86/optimize/libs or bullet-2.66/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, you may need to manually copy the files in VDrift's data folder into the installed data location.}} ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 7479650fd32583549ae5f1be46170cb3c0c7cbf7 248 247 2008-10-03T14:20:36Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution. On linux it can be compiled like this: * cd bullet-2.66 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.66 tree that the VDrift build files are expecting (in either bullet-2.66/out/linuxx86/optimize/libs or bullet-2.66/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 265f31da05c33db1ffa369ef0d6bda7e9a633638 249 248 2008-10-21T14:46:35Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu hardy the packages required are: libsdl-gfx1.2-4 libsdl-gfx1.2-4-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution. On linux it can be compiled like this: * cd bullet-2.66 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.66 tree that the VDrift build files are expecting (in either bullet-2.66/out/linuxx86/optimize/libs or bullet-2.66/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. b9c3bdb30c02c87a5e57adc750b57c1341d51e67 Car parameters for vdrift-2009-06-15 and older 0 11 141 140 2008-08-27T03:57:50Z Venzon 1 /* Suspension */ wikitext text/x-wiki The file's fields are mostly the same as the Vamos car parameters, explained in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car-body-center: X (positive in drive direction), Y (positive to left) and Z (positive up). The file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Top level parameters== <pre> drive = RWD </pre> The only top level parameter is the "drive" parameter. It accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 6b2e30853a356a057b165dafe0f8109455bf52f0 Creating cars 0 25 388 387 2008-08-27T04:04:17Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ==Coordinate Systems== Pay attention to the coordinate systems in the example model and in the .car file. They use slightly different coordinate systems. ==Shading and Smoothing== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ==Collision Box== The collision box has to be a cube. It should cover only down to the bottom of the body. Modeling the collision box so that it ends slightly above the bottom of the body allows for additional margin to prevent high-centering the car. The collision box should line up with the body model so that they fit together as desired without being translated. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 6fa4081f319214707bfece7464fee4467048855c 389 388 2008-08-27T04:11:08Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ==Coordinate Systems== Pay attention to the coordinate systems in the example model and in the .car file. They use slightly different coordinate systems. * blender coordinate system car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: mass positioning (same as blender) car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: wheel positioning (tested on Front Right wheel) wheel x = forward and back, negative being back wheel y = left and right, negative being right wheel z = up and down, negative being down * .car file: view positioning (same as wheel) view x = forward & back, negative being back view y = right & left, negative being right view z = up and down, negative being down ==Shading and Smoothing== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ==Collision Box== The collision box has to be a cube. It should cover only down to the bottom of the body. Modeling the collision box so that it ends slightly above the bottom of the body allows for additional margin to prevent high-centering the car. The collision box should line up with the body model so that they fit together as desired without being translated. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 54d1ec92e27e69d1b4a8db1d2f2d6803167b4843 390 389 2008-08-27T04:11:54Z Venzon 1 /* Coordinate Systems */ wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ==Coordinate Systems== Pay attention to the coordinate systems in the example model and in the .car file. They use slightly different coordinate systems. * blender coordinate system car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: mass positioning (same as blender) car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: wheel positioning (tested on Front Right wheel) wheel x = forward and back, negative being back wheel y = left and right, negative being right wheel z = up and down, negative being down * .car file: view positioning (same as wheel) view x = forward & back, negative being back view y = right & left, negative being right view z = up and down, negative being down ==Shading and Smoothing== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ==Collision Box== The collision box has to be a cube. It should cover only down to the bottom of the body. Modeling the collision box so that it ends slightly above the bottom of the body allows for additional margin to prevent high-centering the car. The collision box should line up with the body model so that they fit together as desired without being translated. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 4521efa4c5a51b8842181ff582f4ee6e9a2e13ce 391 390 2008-08-27T04:12:50Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== Pay attention to the coordinate systems in the example model and in the .car file. They use slightly different coordinate systems. * blender coordinate system car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: mass positioning (same as blender) car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: wheel positioning (tested on Front Right wheel) wheel x = forward and back, negative being back wheel y = left and right, negative being right wheel z = up and down, negative being down * .car file: view positioning (same as wheel) view x = forward & back, negative being back view y = right & left, negative being right view z = up and down, negative being down ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Collision Box=== The collision box has to be a cube. It should cover only down to the bottom of the body. Modeling the collision box so that it ends slightly above the bottom of the body allows for additional margin to prevent high-centering the car. The collision box should line up with the body model so that they fit together as desired without being translated. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 12a010d2fc66b91b157a92e2baa9fea48f2c5989 Creating tracks 0 26 426 425 2008-10-13T14:14:18Z Venzon 1 wikitext text/x-wiki {{note|These instructions are meant for Linux, not Windows. Although you can do this on Windows, you'll probably need to ask for better directions on the VDrift forums. http://vdrift.net/Forum/index.php}} ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The differnce in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe (since they are in the pack file). * Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 4b5ae21023100a5ebc87b31d82059aa2942cdc74 427 426 2008-10-13T14:24:43Z Venzon 1 wikitext text/x-wiki {{note|These instructions are meant for Linux, not Windows. Although you can do this on Windows, you'll probably need to ask for better directions on the VDrift forums. http://vdrift.net/Forum/index.php}} ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The differnce in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! cb24a2a3f62521d85fd318469911d47065278f1f Compiling VDrift 0 16 250 249 2008-10-21T14:47:16Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu hardy the packages required are: libsdl-gfx1.2-4 libsdl-gfx1.2-4-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution. On linux it can be compiled like this: * cd bullet-2.66 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.66 tree that the VDrift build files are expecting (in either bullet-2.66/out/linuxx86/optimize/libs or bullet-2.66/out/linux/optimize/libs). ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can get the development version. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. e7af001ef7df320db6146c2db7d7df92f4226b46 251 250 2008-10-21T15:55:37Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu hardy the packages required are: libsdl-gfx1.2-4 libsdl-gfx1.2-4-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace 2.68 with whatever version is included with the VDrift source distribution): * tar zxvf bullet-2.68.tgz * cd bullet-2.68 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.68 tree that the VDrift build files are expecting (in either bullet-2.68/out/linuxx86/optimize/libs or bullet-2.68/out/linux/optimize/libs). It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to try to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 84775b32bb09951103e602543232e69df28bf9eb 252 251 2008-10-21T15:57:15Z Venzon 1 /* Options */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu hardy the packages required are: libsdl-gfx1.2-4 libsdl-gfx1.2-4-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace 2.68 with whatever version is included with the VDrift source distribution): * tar zxvf bullet-2.68.tgz * cd bullet-2.68 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.68 tree that the VDrift build files are expecting (in either bullet-2.68/out/linuxx86/optimize/libs or bullet-2.68/out/linux/optimize/libs). It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Options==== There are a few options it's important to know about when installing VDrift. These include the install location, and the amount of data that is installed. To install the full data set you must turn off the '''minimal''' option, which is on by default. scons install minimal=0 You can also change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. cbccee0bedc01e855629f8850bdf071d862f85eb 253 252 2008-10-21T15:58:15Z Venzon 1 /* Options */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu hardy the packages required are: libsdl-gfx1.2-4 libsdl-gfx1.2-4-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace 2.68 with whatever version is included with the VDrift source distribution): * tar zxvf bullet-2.68.tgz * cd bullet-2.68 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.68 tree that the VDrift build files are expecting (in either bullet-2.68/out/linuxx86/optimize/libs or bullet-2.68/out/linux/optimize/libs). It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 96c5b025f020cf6b28c6789ec0bf9b14ac1ec071 254 253 2008-12-15T15:12:48Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace 2.68 with whatever version is included with the VDrift source distribution): * tar zxvf bullet-2.68.tgz * cd bullet-2.68 * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-2.68 tree that the VDrift build files are expecting (in either bullet-2.68/out/linuxx86/optimize/libs or bullet-2.68/out/linux/optimize/libs). It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 68e1f2e8e1abe71e27753dfa4ba3be5488f3a0ba 255 254 2008-12-17T19:55:23Z Venzon 1 /* Bullet */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X * ./autogen.sh * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting (in either bullet-X/out/linuxx86/optimize/libs or bullet-X/out/linux/optimize/libs). It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS], [http://www.python.org/ Python] and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 065cf7697eed3c979a46df6f4cef0aace1675491 256 255 2008-12-20T19:50:05Z Venzon 1 /* Windows */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X * ./autogen.sh * ./configure * jam bulletcollision bulletmath This should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting (in either bullet-X/out/linuxx86/optimize/libs or bullet-X/out/linux/optimize/libs). It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift. ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. c55d4aa67ac28b9be89c92f718c64d2a7e6f3f48 257 256 2009-01-25T19:25:43Z Venzon 1 /* Bullet */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 1a05aac4ba357fcf9f1e13650cb16330a1a25775 258 257 2009-01-29T05:02:54Z Venzon 1 wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev ====Bullet==== The Bullet physics library is required. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 0dd10b660a776ce782382d996b7afcc105980aa5 262 261 2009-02-02T04:56:38Z Venzon 1 /* Bullet */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec * libtool - A generic library support script * freeglut3-dev - OpenGL Utility Toolkit development files Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libtool libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev freeglut3-dev ====Bullet==== As of SVN R2321 on 2/1/2009, bullet source is now built by the normal VDrift build method. The only step required is to untar the bullet source files (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz Directions for building bullet for older VDrift versions is shown below. You can skip this. ====Bullet (old directions)==== The Bullet physics library is required to be built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 78811cea3e34a9d7a625b940b8711b7caada2acf 2008 Refactor Project 0 2 5 4 2008-10-21T15:44:53Z Venzon 1 wikitext text/x-wiki ==Overview== Hacking on VDrift was getting harder and harder. Each new feature that was added required more work and made it that much more difficult to add the next feature. So, a major code refactor/rewrite was begun in April 2008. One side effect of this effort was that any new bugs or feature suggestions were put in the issues system as future "to do" items. ==Status== The refactor was moved into the trunk on 10/21/08. The old trunk code was moved to: http://svn.vdrift.net/repos/vdrift/tags/oldtrunk Bullet is now included in the repository as a .tgz archive. Unzip and untar the archive, then rename the bullet folder to bullet-2.68. 5ab49699d0b0783799610b1e704f283b3c3146e5 6 5 2008-10-26T21:48:30Z Venzon 1 wikitext text/x-wiki ==Overview== Hacking on VDrift was getting harder and harder. Each new feature that was added required more work and made it that much more difficult to add the next feature. So, a major code refactor/rewrite was begun in April 2008. One side effect of this effort was that any new bugs or feature suggestions were put in the issues system as future "to do" items. ==Status== The refactor was moved into the trunk on 10/21/08. The old trunk code was moved to: http://svn.vdrift.net/repos/vdrift/tags/oldtrunk 01874126c233048e269eed1a1c84b88a955fa18c 7 6 2008-10-26T21:48:50Z Venzon 1 wikitext text/x-wiki ==Overview== Hacking on VDrift was getting harder and harder. Each new feature that was added required more work and made it that much more difficult to add the next feature. So, a major code refactor/rewrite was begun in April 2008. One side effect of this effort was that any new bugs or feature suggestions were put in the issues system as future "to do" items. ==Status== The refactor was deemed "complete enough" and moved into the trunk on 10/21/08! The old trunk code was moved to: http://svn.vdrift.net/repos/vdrift/tags/oldtrunk fb14f926392060d501d2e0f805c6b1eb578bfc4d Working with the development version 0 90 1069 1068 2008-10-21T15:47:22Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. ac97c5cd7f003efeb75aea1624cfc40192f77942 1070 1069 2008-12-14T17:18:40Z Venzon 1 /* Checking out the code */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 838ff1ce1ffef6552fd641fe702eb4255a012f69 1071 1070 2008-12-14T17:19:11Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see [Getting_the_development_version#Linux.2FUnix|the Linux/UNIX instructions at the top of this page]. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. ab9024afbcb52fc69a9f55497c12f291592f0bd7 1072 1071 2008-12-14T19:21:23Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see [Getting_the_development_version#Linux/Unix|the Linux/UNIX instructions at the top of this page]. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 33436559702bf5b2f5cc0b585eb0a7459139aa28 1073 1072 2008-12-14T19:22:22Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the [Getting_the_development_version#Linux/Unix|Linux/UNIX instructions] at the top of this page]. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 0ef6469669af07cd7a25d4df432a5d4d6c138a6d 1074 1073 2008-12-14T19:22:36Z Venzon 1 /* Mac OS X */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the [Getting_the_development_version#Linux/Unix|Linux-UNIX instructions] at the top of this page]. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 2618580577e50f2656190e34faf7aebed4c67edc 1075 1074 2008-12-14T19:22:49Z Venzon 1 /* Mac OS X */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 838ff1ce1ffef6552fd641fe702eb4255a012f69 1076 1075 2008-12-14T19:23:13Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX [http://wiki.vdrift.net/Getting_the_development_version#Linux.2FUnix|instructions] at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. b13a4b5a63e27762a1d7c1a5314e58be4d95faa1 1077 1076 2008-12-14T19:23:53Z Venzon 1 /* Mac OS X */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX [http://wiki.vdrift.net/Getting_the_development_version#Linux/Unix|instructions] at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 6d2779d6f090f229151b71ebf4d464453dee54ac 1078 1077 2008-12-14T19:24:25Z Venzon 1 /* Mac OS X */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX [Getting_the_development_version#Linux/Unix|instructions] at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 977b7bb9be75361bad5248ec2e2a7af0cdefbac1 1079 1078 2008-12-14T19:24:39Z Venzon 1 /* Mac OS X */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX [Getting_the_development_version#Linux.2FUnix|instructions] at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. da31a4d8c7a46f2d3d47f005cbbf6109105d5fd9 1080 1079 2008-12-14T19:24:48Z Venzon 1 /* Mac OS X */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 838ff1ce1ffef6552fd641fe702eb4255a012f69 Old List of cars 0 57 711 710 2008-10-24T03:02:47Z Venzon 1 wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. * 3S: Mazda 3 series sedan * AX2: Fictional Concept Car * C7: Lotus Super 7 remake aka "Locost" * CO: Shelby Cobra * CS: Porsche 911 Clubsport * CT: Porsche Carrera Turbo * F1: Modern F1 car * FE: Ford Escort MKII Rally * FF: Formula Ford * G4: Ford GT40 * GT: Ford Mustang GT * M3: BMW E30 M3 * M7: Mazda RX-7 FC * M8: Mazda RX-8 * MC: Mini Cooper (new style) * MI: Mini Cooper (old style) * NS: Nissan Skyline R32 * RG: Renault 12 Gordini * RS2: Subaru Impreza RS 2.5 * SB: sand buggy * T73: Lotus 43 * TC: Toyota Celica ST185 Rally * TL: Toyota Levin * TL2: Toyota Levin (model version 2) * XG: BMW 330cxi * XM: BMW M3 SPEED World Challenge * XS: Honda S2000 * Z06: Chevrolet C5 Corvette Z06 0c0bb973c30a6ab10ebfd9dbfb2fda5e2a4967c9 Car parameters for vdrift-2009-06-15 and older 0 11 142 141 2008-10-26T21:42:06Z Venzon 1 wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate systems== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. ===Coordinate system version 1=== Previous to code revision 2196, the .car files used mixed coordinate systems but were mostly the following: X (positive in drive direction), Y (positive to left) and Z (positive up). ===Coordinate system version 2=== As of code revision 2196, the .car files can optionally use the following coordinate system for all parameters: X (positive to right), Y (positive to front) and Z (positive up). This coordinate system was picked because it should match the blender coordinates. To use this coordinate system, specify version = 2 in the top level parameters section. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described earlier in this article. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 6da6da854b422882b50cbf2af6219a4a50125c3f 143 142 2008-10-26T21:54:49Z Venzon 1 wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 983477d95e4649c42bb43f74597f3c1c325b42f9 144 143 2009-01-13T18:58:37Z Venzon 1 /* Driver */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-delay = 0.08 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-delay tag tells how long it takes to change gears. For a paddle-shifter, like a modern Formula One car, shift-delay can be set to zero. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 995ff37717831659e4bd6e02f486c3f626a1bf88 145 144 2009-01-18T06:22:08Z Venzon 1 /* Transmission */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. d45ca027945a0cb94c8d33c639d80a74869d205a 146 145 2009-01-18T06:26:45Z Venzon 1 /* Transmission */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 5ff4506d9ea9ce8fc62b6a6b966fea6bf19713b9 About the project 0 4 28 27 2008-10-26T21:47:07Z Venzon 1 /* Description */ wikitext text/x-wiki ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v2. It is currently available for Linux, FreeBSD, Mac OS X and Windows (Cygwin). ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 20 tracks, almost 30 cars * Simple networked multiplayer mode (currently disabled, waiting to be rewritten) * Very realistic physics * Mouse/joystick/keyboard driven menus * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake lights * Driver aids: automatic shifting, traction control, anti-lock braking ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. 969d40653dbdebe2f872f8dfb3e4fc4dfc3b1e8b 29 28 2008-10-26T21:47:48Z Venzon 1 wikitext text/x-wiki ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v2. It is currently available for Linux, FreeBSD, Mac OS X and Windows (Cygwin). ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 20 tracks, almost 30 cars * Simple networked multiplayer mode (currently disabled, waiting to be rewritten) * Very realistic physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. 22fa8c83ba882da0215eed268b1240c6414b9c96 Coordinate systems 0 24 375 2008-10-26T21:53:14Z Venzon 1 New page: ==Coordinate system version 1== Previous to code revision 2196, the .car files all used mixed coordinate systems. * blender coordinate system car x = right & left, negative being left ... wikitext text/x-wiki ==Coordinate system version 1== Previous to code revision 2196, the .car files all used mixed coordinate systems. * blender coordinate system car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: mass positioning (same as blender) car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: wheel positioning (tested on Front Right wheel) wheel x = forward and back, negative being back wheel y = left and right, negative being right wheel z = up and down, negative being down * .car file: view positioning (same as wheel) view x = forward & back, negative being back view y = right & left, negative being right view z = up and down, negative being down ===Coordinate system version 2== As of code revision 2196, the .car files can optionally use the following coordinate system for all parameters: car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down This coordinate system was picked because it matches the blender coordinates. To use this coordinate system, specify "version = 2" in the .car file. 91efba39113e86e178a149614d5fbdfdd08293cc Creating cars 0 25 392 391 2008-10-26T21:53:39Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate Systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Collision Box=== The collision box has to be a cube. It should cover only down to the bottom of the body. Modeling the collision box so that it ends slightly above the bottom of the body allows for additional margin to prevent high-centering the car. The collision box should line up with the body model so that they fit together as desired without being translated. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. a8c0db22fba383f5e67abf1df7007fa5635d7a32 393 392 2008-10-26T21:54:02Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Collision Box=== The collision box has to be a cube. It should cover only down to the bottom of the body. Modeling the collision box so that it ends slightly above the bottom of the body allows for additional margin to prevent high-centering the car. The collision box should line up with the body model so that they fit together as desired without being translated. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 0032918fbb628af93a303389fdc78c978b509261 Main Page 0 1 630 1 2009-01-23T01:23:49Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''General Info''' *[[About the project]], [[Community]] *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''Installation''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Configuration''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Setting up Force Feedback]] |width="250px"|'''Playing''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Files''' *[[User settings directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''Development''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Cars''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] |width="250px"|'''Tracks''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} 341c12c8e89d929cedc88ca5a1c583551b8a8535 631 1 2009-01-23T01:24:20Z Venzon 1 /* Welcome */ wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''General Info''' *[[About the project]], [[Community]] *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''Installation''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Configuration''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Setting up force feedback]] |width="250px"|'''Playing''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Files''' *[[User settings directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''Development''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Cars''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] |width="250px"|'''Tracks''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} c8f12e997c27d3714dcf6ef9cb25c7c9761560e9 632 1 2009-01-23T06:24:32Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''General Info''' *[[About the project]], [[Community]] *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''Installation''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Configuration''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''Playing''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Files''' *[[User settings directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''Development''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Cars''' *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] |width="250px"|'''Tracks''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} fd59698f591b7bb5faee7c916cc94a98669bfb25 Configuring the controls 0 20 344 343 2009-01-23T01:24:56Z Venzon 1 /* Force Feedback Device */ wikitext text/x-wiki VDrift aims to be very user input friendly, and thus there are many different ways to adjust the controls in the game to fit each user's needs. There are options which affect all the controls, options which affect only a certain type of controls, and options that affect each individual control assignment. ==Features== * Any input method can be used to navigate the menu. * Joysticks can be used by calibrating them in the '''Options -> Controls -> Joystick -> Calibrate''' menu. * Any input can be assigned to any control. * Gas, brake, and steering controls only allow a single setting. All other controls can have any number of settings on any types of input devices. ==Control options== Control options are defined in the text configuration file [[options.config]], set in the '''Options -> Controls''' menu and its submenus, and stored in the text configuration file [[VDrift.config]]. ===AutoClutch=== * type: boolean * setting: control.autoclutch * values: on, off Enable/disable automatic clutching (prevents car from stalling). Simulates the driver pressing the clutch in using foot when RPM gets close to the stall point. ===AutoShift=== * type: boolean * setting: control.autotrans * values: on, off Enable/disable automatic transmission shifting. ===Button Control Delay=== * type: float * setting: control.button_ramp * values: off (0.0), long (5.0), medium (7.5), short (10.0) Slow down application of button inputs on analog controls. ===Speed Affect on Steering=== * type: float * setting: control.speed_sens_steering * values: range 0.0 to 1.0 The higher the value on this setting, the more steering is limited as car speed increases. ===Joystick Type=== * type: string * setting: joystick.type * values: "joystick", "wheel" Change the type of joystick device. ===Force Feedback Device=== * type: string * setting: joystick.ff_device * values: something like "/dev/input/eventX" Device file for force feedback events. For more detail, see [[Setting up force feedback]]. ===Force Feedback Gain=== * type: float * setting: joystick.ff_gain * values: range 0.5 to 5.0 Multiplier to adjust strength of force feedback. ===Invert Force=== * type: boolean * setting: joystick.ff_invert * values: on, off Reverse the force feedback, if necessary for your wheel. ===200 Degree Wheel=== * type: boolean * setting: joystick.two_hundred * values: on, off Limit steering range to 200 degrees, gives a realistic feel to limited range wheels. ==Assigning controls== Control assignments can be configured through the submenus of the '''Options -> Controls -> Assign Controls''' menu, and stored in the text configuration file [[controls]]. Control assignments can be edited after they are set. There are two basic types of control, analog and digital. Analog controls include joystick axes and mouse motion, while digital controls are keys, mouse buttons and joystick buttons. Any type of input can be assigned to any type of control. So, for example, a digital control - like a key - can be assigned to an analog control. If the "Button Control Delay" option is something other than 0.0, then the key will behave just like a true analog control. ===Car Controls=== =====Gas===== * control name: gas The gas control causes the car to speed up. =====Brake===== * control name: brake The brake control causes the car to slow down. =====Steer Left===== * control name: steer_left The steer left control causes the car to turn left. =====Steer Right===== * control name: steer_right The steer right control causes the car to turn right. =====Start Engine===== * control name: start_engine The start engine control will restart the engine if it stalls. {{note|The engine will not start unless the car's transmission is in neutral.}} =====Handbrake===== * control name: handbrake The handbrake brakes only on the back wheels. =====ABS Toggle===== * control name: abs_toggle The ABS Toggle turns anti-lock braking on or off while playing. =====TCS Toggle===== * control name: tcs_toggle The TCS Toggle turns traction control on or off while playing. ====Transmission==== =====Shift Up===== * control name: disengage_shift_up The shift up control changes the car's gear to the next one. =====Shift Down===== * control name: disengage_shift_down The shift down control changes the car's gear to the previous one. =====Engage Clutch===== * control name: engage The engage clutch control lets out the clutch. This must be done after every shift. =====Analog Clutch===== * control name: clutch The analog clutch control can allow you to use an external clutch pedal. ====Gears==== =====Neutral===== * control name: neutral The neutral control shifts the car into neutral. =====1st===== * control name: first_gear The first gear control shifts the car into first gear. =====2nd===== * control name: second_gear The second gear control shifts the car into second gear. =====3rd===== * control name: third_gear The third gear control shifts the car into third gear. =====4th===== * control name: fourth_gear The fourth gear control shifts the car into fourth gear. =====5th===== * control name: fifth_gear The fifth gear control shifts the car into fifth gear. =====6th===== * control name: sixth_gear The sixth gear control shifts the car into sixth gear. =====Reverse===== * control name: reverse The reverse control puts the car into reverse gear. ===Game Controls=== =====Pause===== * control name: pause The pause control freezes the game (except in multiplayer). ====Camera Views==== =====Previous Camera===== * control name: view_prev_camera This moves to the previous camera in the set (hood, in-car, chase rigid, chase loose). =====Next Camera===== * control name: view_next_camera This moves to the next camera in the set (hood, in-car, chase rigid, chase loose). =====Hood===== * control name: view_hood The hood camera control moves the camera to the car's hood. =====In-Car===== * control name: view_incar The in-car camera control moves the camera to driver's view. =====Chase (Rigid)===== * control name: view_chaserigid The rigid chase camera control moves the camera to a fixed distance behind the car. =====Chase (Loose)===== * control name: view_chase The loose chase camera control moves the camera to follow the car like a helicopter. =====Orbit===== * control name: view_orbit The orbit camera control swings around the car [[Configuring the controls#Camera_Movement|as the camera moves]]. =====Free===== * control name: view_free The free camera control can be moved anywhere using the arrow keys. =====Focus Next===== * control name: focus_next_car Changes the camera to focus on the next car. =====Focus Previous===== * control name: focus_prev_car Changes the camera to focus on the previous car. ====Camera Movement==== =====Pan Left===== * control name: pan_left Turn the camera view to the left. =====Pan Right===== * control name: pan_right Turn the camera view to the right. =====Pan Up===== * control name: pan_up Turn the camera view upwards. =====Pan Down===== * control name: pan_down Turn the camera view downwards. =====Zoom In===== * control name: zoom_in Zoom camera in. =====Zoom Out===== * control name: zoom_out Zoom camera out. ====Replays==== =====Skip Forward===== * control name: replay_ff The skip forward control skips ahead ten seconds during a replay. =====Skip Backward===== * control name: replay_rw The skip backward control goes back ten seconds during a replay. ====Tools==== =====Screen Shot===== * control name: screen_shot The screen shot control saves a snapshot of the game while playing. =====Joystick Info===== * control name: joystick_info The joystick info control shows debugging info for available joysticks. ==Editing Controls== After controls have been assigned they can be edited to change some properties of the control. To edit a control just click on it in one of the control assignment menus. ===Analog control properties=== Analog controls include joystick axes and mouse motion. These have options for deadzone, gain and exponent. ====Deadzone==== Deadzone allows motion under a certain threshold percentage to be ignored. This is useful if you use a joystick which "wobbles" around the center. You may see the brake lights come on when you let go of the gas, or the car is hard to keep going straight, deadzone will help to fix these things. ====Gain==== Gain multiplies the input value by a percentage. This will make the input value increase linearly. ====Exponent==== Exponent raises the input value on an exponential curve. This helps give more fine-tuning of controls such as steering around the center but still allows for making sharp turns if needed. ===Digital control properties=== ====Up/Down==== This controls whether the action will be triggered when the button/key is pressed (down), or released (up). ====Held/Once==== This should be set to "held" when they a digital input is mapped to an analog control, like when using keys for gas, brake or steering. This is set automatically when the control is assigned. ==Deleting controls== There is a Delete button on each Control Editing screen, so to delete a control just click on it, then click Delete. 7357e66bf4e559abe15c5f35d21883cb0ad0bacb Setting up force feedback 0 76 887 2009-01-23T01:27:02Z Venzon 1 New page: Force feedback is currently only supported on Linux. Prerequisites: * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linu... wikitext text/x-wiki Force feedback is currently only supported on Linux. Prerequisites: * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in kernel-source/drivers/usb/input/hid-ff.c * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be /dev/input/eventX). * VDrift SVN r1547 or later Once you've met the prerequisites, now recompile vdrift like this: Code: scons force_feedback=1 Now open your VDrift.config. Find the section [ joystick ] and add the following line to the joystick section somewhere: Code: ff_device = /dev/input/event0 change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. f5d0cdc10212b490f2db8ab746642189583d5b4e 888 887 2009-01-23T01:27:28Z Venzon 1 wikitext text/x-wiki Force feedback is currently only supported on Linux. Prerequisites: * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in kernel-source/drivers/usb/input/hid-ff.c * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be /dev/input/eventX). * VDrift SVN r1547 or later Once you've met the prerequisites, now recompile vdrift like this: scons force_feedback=1 Now open your VDrift.config. Find the section [ joystick ] and add the following line to the joystick section somewhere: ff_device = /dev/input/event0 change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. ed3fd3ab68e247d32bfcabe15c23146bcf76560e 889 888 2009-01-23T01:27:43Z Venzon 1 wikitext text/x-wiki Force feedback is currently only supported on Linux. Prerequisites: * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in kernel-source/drivers/usb/input/hid-ff.c * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be /dev/input/eventX). * VDrift SVN r1547 or later Once you've met the prerequisites, now recompile vdrift like this: scons force_feedback=1 Now open your VDrift.config. Find the section [ joystick ] and add the following line to the joystick section somewhere: ff_device = /dev/input/event0 change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. c1b99150828b6bb0159e8dfcda88a98405eb4317 890 889 2009-01-23T06:23:48Z Venzon 1 wikitext text/x-wiki Force feedback is currently only supported on Linux. ==Prerequisites== * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in kernel-source/drivers/usb/input/hid-ff.c * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be /dev/input/eventX). * VDrift SVN r1547 or later ==Enabling force feedback in VDrift== Once you've met the prerequisites, recompile vdrift like this: scons force_feedback=1 Now open your VDrift.config. Find the section [ joystick ] and add the following line to the joystick section somewhere: ff_device = /dev/input/event0 change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. 552b8beeec16fe6794c0efe44de89bc19839c3f3 891 890 2009-01-24T01:13:10Z Venzon 1 wikitext text/x-wiki Force feedback is currently only supported on Linux. ==Prerequisites== * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in kernel-source/drivers/usb/input/hid-ff.c * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be /dev/input/eventX). * you must have write permission to /dev/input/eventX * VDrift SVN r1547 or later ==Enabling force feedback in VDrift== Once you've met the prerequisites, recompile vdrift like this: scons force_feedback=1 Now open your VDrift.config. Find the section [ joystick ] and add the following line to the joystick section somewhere: ff_device = /dev/input/event0 change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. 0db42d8cb7c130e5fa1a7532bdf87b97393e7f1f Logitech G25 support 0 52 581 2009-01-23T06:24:56Z Venzon 1 New page: VDrift includes a tool used to change G25 modes. The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubun... wikitext text/x-wiki VDrift includes a tool used to change G25 modes. The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Once making the tool, simply run: ./G25manage --nativemode and ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. 50354741481ce3dfa5d28c8a6ca3c6993e6a0025 582 581 2009-01-23T06:25:48Z Venzon 1 wikitext text/x-wiki VDrift includes a tool used to change G25 modes. The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run make to compile the tool, then run: ./G25manage --nativemode and ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. 3700206cb9449ccedb4d6769056bf22987653e5b 583 582 2009-01-23T06:26:29Z Venzon 1 wikitext text/x-wiki VDrift includes a tool used to change G25 modes. The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run make to compile the tool, then run: sudo ./G25manage --nativemode and sudo ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. a7177277c2da408adf721ceee452d4b333513ce6 584 583 2009-01-24T01:12:25Z Venzon 1 wikitext text/x-wiki VDrift includes two tools that can be used to change G25 modes. Either tool can be used; use whichever tool works the best for you. ==usbtool== The tool can be found in VDrift/tools/usbtool-0.1.tar.gz. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example) as well as the swig package. Run ./build.sh and then run ./usbtool to see the options available. To set the wheel to native mode and the range to 900 degrees, run: sudo ./usbtool g25-set-range-wheel-900 and sudo ./usbtool g25-set-extended-mode This will likely disconnect the joystick driver. To reconnect it run: sudo rmmod joydev;sudo rmmod usbhid;sudo modprobe usbhid ==G25manage== The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run make to compile the tool, then run: sudo ./G25manage --nativemode and sudo ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. d621950b7b67bd3caae344e2f31b1e229a949ba1 585 584 2009-01-24T01:15:40Z Venzon 1 wikitext text/x-wiki ==Windows== The G25 should be fully supported in Windows without any special steps. ==Linux== When initially plugged in, the G25 will be in compatibility mode, which restricts the steering range and disables the clutch pedal and some of the gears on the H-shifter. VDrift includes two tools that can be used to change G25 modes. Either tool can be used; use whichever tool works the best for you. ===usbtool=== The tool can be found in VDrift/tools/usbtool-0.1.tar.gz. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example) as well as the swig package. Run ./build.sh and then run ./usbtool to see the options available. To set the wheel to native mode and the range to 900 degrees, run: sudo ./usbtool g25-set-range-wheel-900 and sudo ./usbtool g25-set-extended-mode This will likely disconnect the joystick driver. To reconnect it run: sudo rmmod joydev;sudo rmmod usbhid;sudo modprobe usbhid ===G25manage=== The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run make to compile the tool, then run: sudo ./G25manage --nativemode and sudo ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. 5e2a4bfae649c630cccde4fe5c951c0e94b78011 Compiling VDrift 0 16 263 262 2009-02-02T05:02:10Z Venzon 1 /* Bullet */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec * libtool - A generic library support script * freeglut3-dev - OpenGL Utility Toolkit development files Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libtool libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev freeglut3-dev ====Bullet==== As of SVN R2321 on 2/1/2009, bullet source is now built by the normal VDrift build method. The only step required is to un-tar the bullet source files (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz Directions for building bullet for older VDrift versions is shown below. You can skip this. ====Bullet (old directions)==== The Bullet physics library is required to be built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 639cd8512d91ddd85eeac61c2880a5bbc78c5b4e 264 263 2009-02-02T05:02:37Z Venzon 1 /* Bullet */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec * libtool - A generic library support script * freeglut3-dev - OpenGL Utility Toolkit development files Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libtool libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev freeglut3-dev ====Bullet==== As of SVN R2321 on 2/1/2009, bullet source is now built by the normal VDrift build method. The only step required is to un-tar the bullet source files (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz Directions for building bullet for older VDrift versions are shown below. You can skip these. ====Bullet (old directions)==== The Bullet physics library is required to be built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. d21cfbb492df03b4d0dd24e0ddd2f8c3f67aaca5 265 264 2009-02-02T05:02:59Z Venzon 1 /* Bullet (old directions) */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec * libtool - A generic library support script * freeglut3-dev - OpenGL Utility Toolkit development files Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libtool libvorbisfile3 bjam jam ftjam libvorbis-dev libglew-dev freeglut3-dev ====Bullet==== As of SVN R2321 on 2/1/2009, bullet source is now built by the normal VDrift build method. The only step required is to un-tar the bullet source files (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz Directions for building bullet for older VDrift versions are shown below. You can skip these. ====Bullet (old directions)==== The Bullet physics library must be manually built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 4326fdd0122f2d4bf4ab31d27d004b87376fb5ad 266 265 2009-02-02T17:44:11Z Venzon 1 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 libvorbis-dev libglew-dev ====Bullet==== As of SVN R2321 on 2/1/2009, bullet source is now built by the normal VDrift build method. The only step required is to un-tar the bullet source files (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz Directions for building bullet for older VDrift versions are shown below. You can skip these. ====Bullet (old directions)==== The Bullet physics library must be manually built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now there is a handy script that sets up the VDrift/Bullet development environment for you. Once you have changed directories to the place where you checked out VDrift, run this: sh tools/win/setup-win32-dev-environment.sh {{note|This only needs to be run once, the first time you set up VDrift. The only case where it may need to be run again is if the script itself is updated, or the build scripts are updated.}} * Now everything is ready to go, and will be every time you start up MSYS from now on. {{note|If the build_bullet.sh and/or build_vdrift.sh scripts fail immediately after running the setup script for the first time, try restarting MSYS.}} ====Bullet==== * To build Bullet, simply run the command: build_bullet.sh {{note|This may take a while, and you may see many errors. Ignore them...}} {{note|Bullet only needs to be compiled once, or whenever Bullet is updated in the VDrift sources. In this case, the setup script will be updated and you should run it again before running build_bullet.sh again.}} ====VDrift==== * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Copy build/vdrift.exe, and all the necessary libraries to the root VDrift directory. cp build/vdrift.exe tools/win/dll/*.dll tools/win/dll/*.a "$VDRIFT_DIR" * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 7f7e0820388c4334766ba3adc132668bfeba4678 267 266 2009-02-14T02:59:47Z Venzon 1 /* Windows */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 libvorbis-dev libglew-dev ====Bullet==== As of SVN R2321 on 2/1/2009, bullet source is now built by the normal VDrift build method. The only step required is to un-tar the bullet source files (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz Directions for building bullet for older VDrift versions are shown below. You can skip these. ====Bullet (old directions)==== The Bullet physics library must be manually built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Data===== You must choose a data package to install, as the source package does not come with any data (not even the minimal set). Make sure to get a data set that is in a tarball (.tar.gz file) and not one of the other kinds of packages available for download on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page]. The filename will be something like "vdrift-VERSION-data-full.tar.bz2" (full data set - all cars and tracks) or "vdrift-VERSION-data-minimal.tar.bz2" (minimal data set - small download size). Before you can install VDrift, you must unpack the data so that it's in the source directory. If you downloaded the correct package, the data can be unpacked in the same place that the source package was unpacked. tar jxvf vdrift-2005-10-02-data-full.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. b292ca2488232e526ff2ca0dc624a6cf6329e414 268 267 2009-02-16T00:58:14Z Venzon 1 /* Linux */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required libraries include: * libsdl - Simple Direct Media Layer * libglew - OpenGL extension utilities * sdl-gfx - Graphics drawing primitives library for SDL * sdl-image - Image file loading library for SDL * sdl-net - Low-level network library for SDL * vorbisfile - File loading library for the ogg vorbis format * libvorbis-dev - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu the packages required are: libsdl-gfx1.2 libsdl-gfx1.2-dev libsdl-image1.2 libsdl-image1.2-dev libsdl-net1.2 libsdl-net1.2-dev libvorbisfile3 libvorbis-dev libglew-dev ====Bullet==== As of SVN R2321 on 2/1/2009, bullet source is now built by the normal VDrift build method. The only step required is to un-tar the bullet source files (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz Directions for building bullet for older VDrift versions are shown below. You can skip these. ====Bullet (old directions)==== The Bullet physics library must be manually built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): * tar zxvf bullet-X.tgz * cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =====Using Jam===== * ./autogen.sh * ./configure * jam bulletcollision bulletmath =====Using CMake===== * cmake . * make =====Using autotools===== * ./autogen.sh * ./configure * make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process hasn't been maintained for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 85f326f670326b1ac8e80ea178220fcd3aeee7eb 272 271 2009-04-23T02:58:18Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''sdl-net''' - Low-level network library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis-dev''' - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev ====Bullet==== For the 2009-02-15 release, Bullet is now built by SCons along with the rest of VDrift. The only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz As of SVN R2358, this step is no longer required. {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 3da9645aa0a97cea94b5ac21a57f61906b818f01 273 272 2009-05-07T23:46:12Z Venzon 1 /* Bullet */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''sdl-net''' - Low-level network library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis-dev''' - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, Bullet is now built by SCons along with the rest of VDrift. The only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 846db1c65ceb4ce188a78444b8a09e253d928dec 274 273 2009-05-07T23:46:23Z Venzon 1 /* Bullet */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''sdl-net''' - Low-level network library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis-dev''' - The Vorbis General Audio Compression Codec Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. f2639427bdea1b88769bb20149eb65ac3d7a7e02 275 274 2009-05-13T14:33:08Z Venzon 1 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libvorbis-dev libglew-dev libboost-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. ab8a1adad129497cef58e5713529ebff905e055c 277 276 2009-05-22T02:26:23Z Venzon 1 /* Building */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libvorbis-dev libglew-dev libboost-dev On jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. ecef621bf3b20ff66a40c095ecab0cd32db3a2cd Working with the development version 0 90 1081 1080 2009-02-15T17:17:36Z Venzon 1 /* Windows */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, check out the data. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. f661ddee6612a0080ea9dba8139454fae6084552 1082 1081 2009-02-15T17:17:53Z Venzon 1 /* Windows */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, go to the section below called "Checking out the data." ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 51007a8c858985ffa93b774051fb80d68ad87729 1083 1082 2009-02-15T17:20:05Z Venzon 1 /* Checking out the data */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, go to the section below called "Checking out the data." ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift and link vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN website for more information on how to check out a repository. ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. c2f6c1a8fb4f2fef3652352fd426ae7189f2e249 1084 1083 2009-03-16T14:29:25Z Venzon 1 /* Checking out the data */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, go to the section below called "Checking out the data." ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data and link vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift-data vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN website for more information on how to check out a repository. ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. 74ce37e2ee473888452380371f22376f26d453a6 1085 1084 2009-03-16T14:29:41Z Venzon 1 /* Checking out the data */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [Getting_the_development_version#Checking_out_the_data|check out the data]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, go to the section below called "Checking out the data." ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data and link vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN website for more information on how to check out a repository. ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. b699a67b7401228422bd2d9a9bdbd057903343e7 Importing Racer tracks 0 41 532 531 2009-02-24T05:03:18Z Venzon 1 wikitext text/x-wiki ==Directions for importing Racer tracks== {{note|These instructions are meant for Linux}} * Unzip and put racer files in temporary folder RACER_TP (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces). * Create new folder for track in track editor folder TRACKEDITOR_TP. * Convert all texture names to lowercase in RACER_TP via find . -type f -name \*.tga|sort -r|awk '{f=tolower($1); if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh * Make folder TRACKEDITOR_TP/objects/ * Run the following command: dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces. * Open track editor /data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP. Erase VDRIFT_TP/objects/*.joe (since they are in the pack file). * Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to VDrift/gui/tracks/VDRIFT_TP.png (hopefully these png files will be moved into the folders of the individual tracks soon). * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the command mogrify -transparent rgb\(255,0,255\) file.png This can be scripted to speed things up of course. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 415f36677892249f53050669b6042b020e777eb2 533 532 2009-02-24T16:08:38Z Venzon 1 /* Directions for importing Racer tracks */ wikitext text/x-wiki ==Directions for importing Racer tracks== {{note|These instructions are meant for Linux}} * Unzip and put racer files in temporary folder RACER_TP (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces). * Create new folder for track in track editor folder TRACKEDITOR_TP. * Convert all texture names to lowercase in RACER_TP via find . -type f -name \*.tga|sort -r|awk '{f=tolower($1); if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh * Make folder TRACKEDITOR_TP/objects/ * Run the following command: dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces. * Open track editor /data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP. Erase VDRIFT_TP/objects/*.joe (since they are in the pack file). * Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to VDrift/gui/tracks/VDRIFT_TP.png (hopefully these png files will be moved into the folders of the individual tracks soon). * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the commands mogrify -transparent rgb\(255,0,255\) *.png mogrify -fill rgb\(128,128,128\) -opaque rgba\(255,0,255,0\) *.png This can be scripted to speed things up of course. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 011e6c11203590d9008659d7607b2cca814c39e1 534 533 2009-02-24T16:58:45Z Venzon 1 /* Directions for importing Racer tracks */ wikitext text/x-wiki ==Directions for importing Racer tracks== {{note|These instructions are meant for Linux}} * Unzip and put racer files in temporary folder RACER_TP (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces). * Create new folder for track in track editor folder TRACKEDITOR_TP. * Convert all texture names to lowercase in RACER_TP via find . -type f -name \*.tga|sort -r|awk '{f=tolower($1); if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh * Make folder TRACKEDITOR_TP/objects/ * Run the following command: dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces. * Open track editor /data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP. Erase VDRIFT_TP/objects/*.joe (since they are in the pack file). * Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to VDrift/gui/tracks/VDRIFT_TP.png (hopefully these png files will be moved into the folders of the individual tracks soon). * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the commands mogrify -transparent rgb\(255,0,255\) *.png mogrify -fill rgb\(128,128,128\) -opaque rgba\(255,0,255,0\) *.png This can be scripted to speed things up of course. * Set the correct object properties using the VDrift-tracked/listedit [[Listedit tool]]. * Done! 1d2e98fb8bcdc955a59666ed8ef72d8fef8ea043 Listedit tool 0 51 575 574 2009-02-27T02:07:18Z Venzon 1 /* Commands */ wikitext text/x-wiki Listedit is part of the [[Track editor]] tools that simplifies working on [[Track files and formats#list.txt|list.txt]] files. It is a command line style program. ==list.txt format== The list.txt file contains object definitions in sections, separated by a blank line. The lines of the object definition sections are formatted as follows: #vdrift object list file format v0.4 #0 model filename (no spaces allowed) #1 texture filename (no spaces allowed) #2 mipmap texture (1 for true, 0 for false) #3 disable lighting (1 for true, 0 for false) #4 is this a skybox? (1 for true, 0 for false) #5 is this object a transparent blended texture? (1 for true, 0 for false) #6 bumpiness wavelength - length in meters of a bump on a surface #7 bumpiness amplitude - height in meters of a bump on a surface #8 ignore #9 collide-able (1 for true, 0 for false) #10 friction coefficient for surface when driven on with non-treaded tires #11 friction coefficient for surface when driven on with treaded tires #12 rolling resistance coefficient #13 rolling drag coefficient The numbers next to each of the lines is important to the way the listedit program works. ==Commands== The basic commands are * '''load''' * '''save''' * '''ls''' * '''set''' * '''quit''' * '''addparam''' Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format. ===ls=== The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do: ls 1 sky* To find all of the objects that have the skybox property set to true (1), do: ls 4 1 ===set=== The '''set''' command is similar to '''ls'''. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do: set 1 sky* 4 1 {{note|All of the objects will start with default properties.}} ===addparam=== This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter. eb264905407696e92e34169f53d550d3570f5b0b 576 575 2009-02-27T02:08:03Z Venzon 1 /* list.txt format */ wikitext text/x-wiki Listedit is part of the [[Track editor]] tools that simplifies working on [[Track files and formats#list.txt|list.txt]] files. It is a command line style program. ==list.txt format== The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location: http://svn.vdrift.net/viewvc.cgi/trunk/listedit/format.txt?root=VDrift+Track+Editor&view=co The numbers next to each of the lines is important to the way the listedit program works. ==Commands== The basic commands are * '''load''' * '''save''' * '''ls''' * '''set''' * '''quit''' * '''addparam''' Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format. ===ls=== The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do: ls 1 sky* To find all of the objects that have the skybox property set to true (1), do: ls 4 1 ===set=== The '''set''' command is similar to '''ls'''. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do: set 1 sky* 4 1 {{note|All of the objects will start with default properties.}} ===addparam=== This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter. 39d70adfd6b57693e7e5c8efb263b9486b699c2e Car parameters for vdrift-2009-06-15 and older 0 11 147 146 2009-03-11T16:44:42Z Venzon 1 /* Tire */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 4ff8eedb323fdcf012e5a005b404385710b269f1 148 147 2009-04-17T01:34:04Z Venzon 1 /* Contact-points */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter limits the difference in speed between two wheels on the same axle. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 3a0c59d8e9a7f8c21e6861e27502e8c050083f52 149 148 2009-04-18T20:48:32Z Venzon 1 /* Differential */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters can be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 581539455ce508e48182a495de947ddbe0701756 150 149 2009-04-19T20:50:22Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters can be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> position = 1.14, 0.76, -0.03 hinge = 0,0,0 </pre> The spring-constant is the wheel rate in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. The position is the point at which suspension forces (from the wheels) are applied to the chassis. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. a15115a8d0f899b5b163e516ba7670f80ce78509 151 150 2009-04-19T22:38:15Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters can be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel. <pre> spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> hinge = 0,0,0 </pre> The spring-constant is the wheel rate in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter is no longer used and can be omitted. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. bc28d0f58ee3379a1eb6aaac046b09f71bfd42ee 152 151 2009-04-19T22:41:31Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by dividing the clutch pressure by the value in the area tag and multiplying by the radius and sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters can be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the wheel rate in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter is no longer used and can be omitted. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. bd0237812daa0b3ed6bed148506f2c30107d3e90 Old List of cars 0 57 713 712 2009-03-26T19:07:57Z Venzon 1 wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Click the link to go to the svn page for the car. Use the 'Download GNU Tarball' link to download the car. Untar the downloaded package and place it in your data folder to use it. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari F360 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 series sedan * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super 7 remake aka "Locost" * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1/ F1]: Modern F1 car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Impreza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 10da2cd479f940de2d31b0c0f10a503e60ea21f4 Creating cars 0 25 394 393 2009-04-04T15:50:51Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.py/trunk/tools/?root=vdrift-art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 50ab0ceb12d2659cc8018fd8ac06019d1c7ac5b3 395 394 2009-04-17T01:26:22Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. There is also a "shadow.png" that is used for the car's shadow on the ground. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. da5da82776960ff0ead92b6dd928f70a10f6c2ac 396 395 2009-04-17T01:28:37Z Venzon 1 /* Texture the Models */ wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 16b93b24ebca36e9ea517b8297bb6ccbea56126d 397 396 2009-04-17T01:29:11Z Venzon 1 /* About file */ wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [/forum/index.php?forum=5 Development forum]. 2fc7df54fc86aa5c94e0b7f5e8e4bc8831bdb54f 398 397 2009-04-17T01:29:42Z Venzon 1 /* Contribute */ wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The file's fields are explained in detail in the [http://vamos.sourceforge.net/vamos-docs/Cars.html Vamos docs]. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/index.php?forum=5 Development forum]. c930f26f1da74800c1550d3e267891b5bc9efcbc 399 398 2009-04-17T01:31:40Z Venzon 1 /* Car Definition File */ wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/index.php?forum=5 Development forum]. af83874f2eb83eeab52259468231cb188b42e42d 400 399 2009-04-17T01:35:37Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/index.php?forum=5 Development forum]. adc4d1905f9d157ae937b6999c99ce421cbfdbdc Old Numerical Integration 0 66 833 2009-04-04T17:05:39Z Venzon 1 New page: Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calcu... wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. 4fd3d5280b79af9bd37508f27c62f7d54d68209c Numerical Integration 0 55 681 680 2009-04-04T17:06:07Z Venzon 1 wikitext text/x-wiki Note: the old version of this page is here: [Old Numerical Integration] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. f271bbd711863407a2019a9fc544ebd44018d11b 682 681 2009-04-04T17:06:24Z Venzon 1 wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. 674819aa61f1f6675eb1b888273c202f6054d84d 683 682 2009-04-04T17:51:30Z Venzon 1 wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Acceleration Evaluations |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. 824e64a7876cee2586ae423a476cda0d2cd11df9 684 683 2009-04-04T18:04:09Z Venzon 1 wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). The improved Euler method was handicapped with a timestep twice as large as the other methods, and the RK4 method was handicapped with a timestep four times as large as the other methods, due to performance considerations. 456d4ef585590ecde14f5c81534cc7af5bd27b79 685 684 2009-04-04T18:27:02Z Venzon 1 wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== So where does this leave us? 63ac325cafa758126d94e32bf6fd3f0e2b1e670f 686 685 2009-04-04T18:32:59Z Venzon 1 wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== So where does this leave us? Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |1 |6 |- !SUVAT |4 |2 |2 |5 |- !NSV |6 |5 |4 |2 |- !Modified Verlet |3 |4 |3 |1 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |6 |6 |3 |} 75bf3ed04b71f98433d91490aaa23b8bd02678af 687 686 2009-04-04T18:38:47Z Venzon 1 /* Summary */ wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |1 |6 |- !SUVAT |4 |2 |2 |5 |- !NSV |6 |5 |4 |2 |- !Modified Verlet |3 |4 |3 |1 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |6 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift currently uses the SUVAT method. 730ca03b4e84ccab01e57758073ed41532a97897 688 687 2009-04-04T18:38:58Z Venzon 1 /* Summary */ wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |1 |6 |- !SUVAT |4 |2 |2 |5 |- !NSV |6 |5 |4 |2 |- !Modified Verlet |3 |4 |3 |1 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |6 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift currently uses the SUVAT method. 4448631adbb4cf9e3c70964d43d2558f19133ff1 689 688 2009-04-04T18:40:59Z Venzon 1 /* Summary */ wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |1 |6 |- !SUVAT |4 |2 |2 |5 |- !NSV |6 |4 |4 |2 |- !Modified Verlet |3 |4 |3 |1 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |5 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift currently uses the SUVAT method. 112d9852f63617af95189ea935aad4afbee5eb4b 690 689 2009-04-04T18:43:16Z Venzon 1 /* Summary */ wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |1/2 |6 |- !SUVAT |4 |2 |1/2 |5 |- !NSV |6 |4 |3/4 |1/2 |- !Modified Verlet |3 |4 |3/4 |1/2 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |5 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift currently uses the SUVAT method. 9c7ad7fe49ee59a82bea13f18f6776b42f8604fe 691 690 2009-04-04T18:44:23Z Venzon 1 /* Summary */ wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |tied 1/2 |6 |- !SUVAT |4 |2 |tied 1/2 |5 |- !NSV |6 |4 |tied 3/4 |tied 1/2 |- !Modified Verlet |3 |4 |tied 3/4 |tied 1/2 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |5 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift currently uses the SUVAT method. afe9e1f562ac371ada54887bee0d21c9c402a070 692 691 2009-04-04T18:45:58Z Venzon 1 /* Summary */ wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |tied 1/2 |6 |- !SUVAT |4 |2 |tied 1/2 |5 |- !NSV |6 |4 |tied 3/4 |tied 1/2 |- !Modified Verlet |3 |4 |tied 3/4 |tied 1/2 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |5 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift requires stability in the face of stiff overdamped systems, and currently uses the SUVAT method due to slightly improved accuracy over the euler method. 6962ef77eb91f02d3f82b6031f6bd13a6dee7e95 Coordinate systems 0 24 376 375 2009-04-17T01:27:02Z Venzon 1 wikitext text/x-wiki ==Coordinate system version 1== Previous to code revision 2196, the .car files all used mixed coordinate systems. * blender coordinate system car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: mass positioning (same as blender) car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: wheel positioning (tested on Front Right wheel) wheel x = forward and back, negative being back wheel y = left and right, negative being right wheel z = up and down, negative being down * .car file: view positioning (same as wheel) view x = forward & back, negative being back view y = right & left, negative being right view z = up and down, negative being down ==Coordinate system version 2== As of code revision 2196, the .car files can optionally use the following coordinate system for all parameters: car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down This coordinate system was picked because it matches the blender coordinates. To use this coordinate system, specify "version = 2" in the .car file. aa0e88f8acda6e5b9f53b6c205fa9dd8ae4a076c 377 376 2009-04-17T01:27:11Z Venzon 1 wikitext text/x-wiki ==Coordinate system version 1 (outdated)== Previous to code revision 2196, the .car files all used mixed coordinate systems. * blender coordinate system car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: mass positioning (same as blender) car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down * .car file: wheel positioning (tested on Front Right wheel) wheel x = forward and back, negative being back wheel y = left and right, negative being right wheel z = up and down, negative being down * .car file: view positioning (same as wheel) view x = forward & back, negative being back view y = right & left, negative being right view z = up and down, negative being down ==Coordinate system version 2== As of code revision 2196, the .car files can optionally use the following coordinate system for all parameters: car x = right & left, negative being left car y = forward & back, negative being back car z = up & down, negative being down This coordinate system was picked because it matches the blender coordinates. To use this coordinate system, specify "version = 2" in the .car file. addcca09d3963bcadd53d26ab7cbca28560f2943 Compiling VDrift 0 16 278 277 2009-05-22T02:26:37Z Venzon 1 /* Boost */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libvorbis-dev libglew-dev libboost-dev On jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder.}} ====Installation Options==== You can change the installation prefix. By default, VDrift is installed to <code>/usr/share/games/vdrift</code>, but if you wanted it to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 2c51aee8b8f7c507f61aac3a60a6813c4f24684c 281 280 2009-05-30T19:06:30Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 6873f7cda15f8fe63375d69e81fa5548910cabda 282 281 2009-05-30T19:06:46Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 72234b254d2a29bf0c49f83b87a026e86b62562f 283 282 2009-05-30T19:08:56Z Venzon 1 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 08ce10161b26f16865dc002c5b4785ffa5eb5cb7 284 283 2009-05-30T19:10:08Z Venzon 1 /* SCons */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2005-10-02. Unpack the archive. tar jxvf vdrift-2005-10-02-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2005-10-02-src ====Development version==== You can [[Getting the development version#Linux.2FUnix|check out the development version]] of VDrift from our Subversion repository. Once you've checked out the code, enter the directory Subversion created. cd vdrift ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 47fecac675a9d638b077e7d5a5f2ba7c4a2cf508 285 284 2009-05-30T19:12:46Z Venzon 1 /* Get the Code */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Options==== You may need to use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then add these to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. c5d8aacda5ee4f23cb2dd23c175239e8bc8d244c 286 285 2009-05-30T19:13:49Z Venzon 1 /* Options */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases and may fail to install needed datafiles. If scons install doesn't result in a working installation, manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 6ebaf6b1cb78b1189ef642cf3017ef6c7704db05 287 286 2009-05-30T19:14:53Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run sudo scons install and then manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. ce755b7a06d2c4b4f7597d93c4c858844e7ee5aa 288 287 2009-05-30T19:15:12Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 37be8fc6283ceff87cb038695bf0b98eb095b46b 289 288 2009-05-30T19:15:34Z Venzon 1 /* Installing */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Installation Options==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. dbf129230ebc47e37626a5b3a153b95290828c47 290 289 2009-05-30T19:16:03Z Venzon 1 /* Installation Options */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 5a26ba7d72241adc663184cfba9a70dbf500dfda 291 290 2009-05-30T19:17:58Z Venzon 1 /* Linux */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 090f7761105f1d9109fb55df0eca64613ddcb6e8 292 291 2009-06-07T15:50:54Z Venzon 1 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev On Ubuntu jaunty, rather use: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 59d7be7305a7b567c3477339f4edc4e1388fb074 293 292 2009-06-07T15:51:04Z Venzon 1 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 579980c1ce2ae992bbbd0f27d47e262ff086f8e3 294 293 2009-06-08T03:38:45Z Venzon 1 /* Building */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move the contents to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. dae643dd339d90dde831a97b5fc1f2d963c67a38 295 294 2009-06-08T03:41:22Z Venzon 1 /* Building */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libboost''' - Boost C++ Libraries Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358, no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-02-15. Unpack the archive. tar jxvf vdrift-2009-02-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-02-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 842d0bafc6119a87fd17dd3e20bfd2e11524c91d 296 295 2009-06-17T04:01:32Z Venzon 1 /* Linux */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. f679b45004faffd20358f333bd18a9dcaf645e32 297 296 2009-10-07T02:54:36Z Venzon 1 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. eb92162907a36d5fffd03933782b70970acb1776 298 297 2009-10-17T15:32:01Z Venzon 1 /* VDrift */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build Bullet and VDrift, and then install VDrift into a runtime folder. ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.mingw.org/msys.shtml MSYS and MSYS-DTK], [http://www.python.org/ Python], and [http://www.scons.org/ SCons]. {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 Download MinGW 5.1.3] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Download VDrift Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Building=== ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====VDrift==== To build VDrift you must use the MSYS terminal, compile the Bullet library, and compile VDrift itself. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. ===Running=== Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 27f6303f3fa473284eaa7956bd583f2fd1825a74 299 298 2010-02-02T20:06:46Z NaN 4 /* Windows */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 696695d50add44c0f145ab78952f70a74d5d0574 300 299 2010-02-03T11:39:12Z NaN 4 /* MinGW */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path: C:\MinGW\bin; ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 0d18918ba04a1642825668ab672c80bc9e26869b 301 300 2010-02-03T11:42:35Z NaN 4 /* SCons */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path: C:\MinGW\bin; ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 9a0c04639d7232cf4da9ff8c16bc666b0a34ae3e 302 301 2010-02-03T11:43:16Z NaN 4 /* MinGW */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 0.97] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 9ed29a74c05d9bad094282e3563e957033d08843 303 302 2010-02-03T11:46:29Z NaN 4 /* SCons */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Python==== * [http://www.python.org/ftp/python/2.5.1/python-2.5.1.msi Download Python 2.5.1] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 37a0afaee56e5465ff5af7b5c859ba0f19191e21 304 303 2010-02-03T11:47:42Z NaN 4 /* Python */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Python==== * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. d42cb3fb9c981a77f118c1a575033d0bb79c5a30 305 304 2010-02-03T11:48:04Z NaN 4 /* SCons */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Python==== * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. cfdd778569020f71820bc66a63e1dbff49796c56 Car parameters for vdrift-2009-06-15 and older 0 11 153 152 2009-07-19T17:14:52Z Venzon 1 /* Clutch */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters can be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the wheel rate in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter is no longer used and can be omitted. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. e1ede4d957b213306ebbd76df4d073af8f3abe18 154 153 2009-07-19T17:36:52Z Venzon 1 /* Differential */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 bounce = 2588 rebound = 2612 travel = 0.19 max-compression-velocity = 10.0 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the wheel rate in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter is no longer used and can be omitted. bounce and rebound are the damping coefficients for compression and expansion of the suspension, respectively. If the speed at which the suspension is compressed, or expanded exceeds the value in max-compression-velocity, the dampers “lock up.” Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. ac781175987035a0900fcf7781c6cb01ac8eb304 155 154 2009-08-01T16:38:44Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the wheel rate in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 8647c09b6aa2552b9942c7f6a03d093c082531cf 156 155 2009-08-01T16:43:09Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the wheel rate in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 466d5573a4bda531b8bea5395020096a86df4447 157 156 2009-08-01T17:28:01Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the [[wheel rate]] in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 31fa2d2ef484c825d7b849250867ad70052e39f1 158 157 2009-08-01T17:28:32Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 93d7c0cd6834e66523138ea7c5fe70355c371555 159 158 2009-08-01T17:55:14Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 5c924adc38bbaba2e32b80265dac4f285685644c 160 159 2009-08-01T17:57:07Z Venzon 1 /* Suspension */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 09b013e15abe3cc64d826ebda19da9a0ba2ac73c 161 160 2010-01-29T19:32:33Z NaN 4 /* Clutch */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque on the clutch is found by multiplying the clutch pressure by the value in the area tag, the radius, and the sliding (friction) parameters. The torque capacity of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 7d1c4c3e15b5ee50e3ea10fa45f2c28c6fe2b76b 162 161 2010-01-29T19:34:39Z NaN 4 /* Clutch */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 2d41389d53cf4c2ff1c8eb62c4d56a8075625393 163 162 2010-01-29T19:41:51Z NaN 4 /* Clutch */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 7614d854c6a27f41c3c7b27cb4c39396c81fe7d8 Main Page 0 1 633 1 2009-08-30T15:15:53Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''General Info''' *[[About the project]], [[Community]] *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''Installation''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Configuration''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''Playing''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Files''' *[[User settings directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''Development''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Cars''' *[[List of cars]] *[[Downloading and installing new cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] |width="250px"|'''Tracks''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} 8051798ceceffc7253b26c43e3384d392beecaae 634 1 2009-08-30T15:16:11Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''General Info''' *[[About the project]], [[Community]] *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''Installation''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Configuration''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''Playing''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Files''' *[[User settings directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''Development''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Cars''' *[[List of cars]] *[[Getting new cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] |width="250px"|'''Tracks''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} 2ca6828a02654f2cb504e5a2ff0a063389128410 635 1 2009-08-30T15:16:25Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''General Info''' *[[About the project]], [[Community]] *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''Installation''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Configuration''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''Playing''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Files''' *[[User settings directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''Development''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Cars''' *[[List of cars]] *[[Getting more cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] |width="250px"|'''Tracks''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} b52c1187a68758cce7702bb8b43961620e3454d1 636 1 2009-08-30T15:32:40Z Venzon 1 wikitext text/x-wiki [[Image:Vdrift-logo.png]] ='''VDrift Documentation Wiki'''= == Welcome == Welcome to the [http://vdrift.net/ VDrift] Documentation Wiki. This site contains some information regarding the VDrift project, but it is not yet complete. Users are encouraged to make an account and edit articles, or leave comments. To get familiar with this wiki's format and style, read the [[Wiki usage notes]] page. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''General Info''' *[[About the project]], [[Community]] *[[Authors and contributors]] *[[License]] *[[Contribution]] *[[Reporting problems]] *[[2008 Refactor Project]] |width="250px"|'''Installation''' *[[Hardware requirements]] *[[Software requirements]] *[[Installing on Linux]] *[[Installing on FreeBSD]] *[[Installing on Windows]] *[[Installing on Mac OS X]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Configuration''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''Playing''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Files''' *[[User settings directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''Development''' *[[Release Planning]] *[[Class structure]] *[[Coding Guidelines]] *[[Numerical Integration]] *[[Getting the development version]] *[[Compiling]] *[[Using SCons]] *[[Debugging]] *[[Packaging]] *[[Useful links]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Cars''' *[[Getting more cars]] *[[List of cars]] *[[Car files and formats]] *[[Car parameters]] *[[Creating cars]] *[[Car modeling tutorial]] |width="250px"|'''Tracks''' *[[List of tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Track modeling tutorial]] *[[Importing Racer tracks]] |} e599fdc51d253511bb819c8bfa08cc82df0cdade Creating cars 0 25 401 400 2009-08-30T15:23:23Z Venzon 1 wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [http://svn.vdrift.net/viewvc.cgi/trunk/tools/?root=VDrift+Art Blender export scripts] from [[Getting the development version|SVN]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/forum/index.php?forum=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php/irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/index.php?forum=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. ea3243747b5fff85c6935918859b9e415fa3790c Getting more cars 0 34 493 2009-08-30T15:28:54Z Venzon 1 New page: This article explains how to get more cars for VDrift and how to install them. ==Getting cars== A number of cars can be found on the [http://cars.vdrift.net cars.vdrift.net] website. Navi... wikitext text/x-wiki This article explains how to get more cars for VDrift and how to install them. ==Getting cars== A number of cars can be found on the [http://cars.vdrift.net cars.vdrift.net] website. Navigate to the car you'd like to download and if the car status says it's playable in VDrift, download the .zip file or follow the link to the .tar.gz file. ==Installing cars== You should have a .zip or .tar.gz file at this point. The .zip or .tar.gz extensions are both file compression formats. Uncompress the files with a decompression program such as the free tool [http://www.7-zip.org/ 7zip]. This process should create a folder with the name of the car. Move that folder (which should contain files like about.txt and body.joe) to your VDrift/data/cars folder. You're done! 134ca652b3b2fa228ea56fb5d0abc37fa005c950 Old List of cars 0 57 714 713 2009-08-30T15:32:19Z Venzon 1 wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more cars|this link]] for information about how to install new cars. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari F360 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 series sedan * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super 7 remake aka "Locost" * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1/ F1]: Modern F1 car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Impreza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 94b043591cf268cc5713ade48d46d225229d8870 Creating tracks 0 26 428 427 2009-09-13T18:57:36Z Venzon 1 /* Directions for creating tracks */ wikitext text/x-wiki {{note|These instructions are meant for Linux, not Windows. Although you can do this on Windows, you'll probably need to ask for better directions on the VDrift forums. http://vdrift.net/Forum/index.php}} ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The differnce in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). {{note|Why trace roadways? [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. }} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 5311b9155f1b8bd95b2cf887fb03eb248358e66f 429 428 2009-09-13T18:58:21Z Venzon 1 /* Directions for creating tracks */ wikitext text/x-wiki {{note|These instructions are meant for Linux, not Windows. Although you can do this on Windows, you'll probably need to ask for better directions on the VDrift forums. http://vdrift.net/Forum/index.php}} ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The differnce in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 2a9c008c1123da1682a25c4c8b8e9051184c715a 430 429 2010-01-10T10:38:51Z NaN 4 wikitext text/x-wiki {{note|These instructions are meant for Linux, not Windows. Although you can do this on Windows, you'll probably need to ask for better directions on the VDrift forums. http://vdrift.net/Forum/index.php}} ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The differnce in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Experimental== This modified script exports the track.txt from blender. [http://www.megaupload.com/?d=NB360O00 export-all-joe-0.3.py] To add a lap sequence(start/finish line): * Add an Empty object to the scene. * Position it at the start/finisch line of your track. * Rename it to "lap sequence n"(n is the number of the sequence) To add a car start position: * Add an Empty object to the scene. * Position it on your track. * Rename it to "start position n"(n is the number of the position) [[Image:Experimental.jpg]] e0d7c60552104c8387f268b1effe98583761fb36 431 430 2010-01-10T11:59:30Z NaN 4 wikitext text/x-wiki {{note|These instructions are meant for Linux, not Windows. Although you can do this on Windows, you'll probably need to ask for better directions on the VDrift forums. http://vdrift.net/Forum/index.php}} ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The differnce in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Experimental(Broken)== This modified script exports the track.txt from blender. [http://www.megaupload.com/?d=NB360O00 export-all-joe-0.3.py] To add a lap sequence(start/finish line): * Add an Empty object to the scene. * Position it at the start/finisch line of your track. * Rename it to "lap sequence n"(n is the number of the sequence) To add a car start position: * Add an Empty object to the scene. * Position it on your track. * Rename it to "start position n"(n is the number of the position) [[Image:Experimental.jpg]] ebe6ca66f1d4160e0da357aa4e6538febaf24e93 432 431 2010-01-10T13:30:06Z NaN 4 wikitext text/x-wiki {{note|These instructions are meant for Linux, not Windows. Although you can do this on Windows, you'll probably need to ask for better directions on the VDrift forums. http://vdrift.net/Forum/index.php}} ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The differnce in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! 2a9c008c1123da1682a25c4c8b8e9051184c715a Working with the development version 0 90 1086 1085 2009-11-28T09:35:16Z Timo 6 3 /* Linux/Unix */ wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, go to the section below called "Checking out the data." ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the Linux/UNIX instructions at the top of this page. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data and link vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data vdrift-data ln -sf /home/user/code/vdrift-data /home/user/code/vdrift/data If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN website for more information on how to check out a repository. ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. da28721badd6c5a8a922bd684ceeda482a263f17 Compiling VDrift 0 16 306 305 2010-02-03T11:48:31Z NaN 4 /* Python */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Python==== * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. ====SCons==== * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 3e79702dc0a1970497db1427d67bc513e3ded90e 307 306 2010-02-03T11:48:52Z NaN 4 /* SCons */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== To build VDrift on Windows you'll need working installations of [http://www.mingw.org/ MinGW], [http://www.python.org/ Python], [http://www.scons.org/ SCons], ([http://www.mingw.org/msys.shtml MSYS and MSYS-DTK]). {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Python==== * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. ====SCons==== * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). ===Building with batch script=== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Building with MSYS=== ====MSYS==== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. ====MSYS DTK==== * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. ====Build==== To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. 9fb3141e931d6b6b889e95d8ff54d6736cf07f9c 308 307 2010-02-04T21:19:40Z NaN 4 /* Windows */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. bc935b15a862b8153b15e60379ef5b239f72d7df 309 308 2010-02-04T21:25:28Z NaN 4 /* Windows */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. fafb47bfba53493ba4d702f73f4406ffcc8014e9 310 309 2010-02-11T19:15:31Z NaN 4 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev On Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. aba0f34eec84da693cfe2db4eaf921e6309bce84 311 310 2010-02-11T19:18:28Z NaN 4 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. e7a12a84efc5c9d8cedc38ba55f5ccecb86f4d72 Car parameters for vdrift-2009-06-15 and older 0 11 164 163 2010-02-07T17:32:24Z Venzon 1 /* Tire */ wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. ff8eefcdc70d6870cd5f4d5f7731f6400763550e 165 164 2010-06-30T17:57:15Z NaN 4 [[Car parameters]] moved to [[Car parameters(old)]]: Car parameters update wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. ff8eefcdc70d6870cd5f4d5f7731f6400763550e 166 165 2010-06-30T20:12:14Z NaN 4 wikitext text/x-wiki ==Car parameters description for vdrift-2009-06-15 and older== The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. d2007a5648fb80e1ae1dc2a51f9d8398ae49e682 167 166 2010-06-30T20:17:36Z NaN 4 wikitext text/x-wiki Car parameters description for vdrift-2009-06-15 and older. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. a53a4343dedbf96d3e54b736a7d277f865090620 Tire parameters 0 82 938 2010-06-30T17:57:15Z NaN 4 [[Car parameters]] moved to [[Car parameters(old)]]: Car parameters update wikitext text/x-wiki #REDIRECT [[Car parameters(old)]] 4e73882f90dfe13b21fccfa4a7e429628606355a 939 938 2010-06-30T18:00:14Z NaN 4 wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. 3eccc7d1ad7b3cb512b05a9bd3ce567916b7e8a9 940 939 2010-06-30T18:12:13Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics of the car at a relative position. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and rotational inertia. 02b9f523ea1c74b851c005d6f0da45cfaee68eb5 941 940 2010-06-30T18:58:19Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Wheel== <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 5ef78797e3ac61781c54cfc054e2da51222471d4 942 941 2010-06-30T19:05:13Z NaN 4 [[Car parameters]] moved to [[Tire parameters]]: Tire parameters article wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Wheel== <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 5ef78797e3ac61781c54cfc054e2da51222471d4 943 942 2010-06-30T19:17:16Z NaN 4 wikitext text/x-wiki Example carparts/tire/touring <pre> restitution = 0.1 tread = 0.25 rolling-resistance = 1.3e-2, 6.5e-6 # Lateral force a0=1.55 a1=-55 a2=1750 a3=1900 a4=7.2 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.65 b1=-110 b2=1800 b3=23.3 b4=410 b5=0.075 b6=0 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 # Aligning moment c0=2.2 c1=-4.3 c2=-4.4 c3=-1.9 c4=-9.6 c5=0.0225 c6=0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> Restitution defines tire restitution(not implemented atm). The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm There is a graphical tire parameters editor to adjust/review the parameters: http://svn.vdrift.net/viewvc.cgi 3a2885e8311278dac1c582c5c4d8aecfab1ecb56 944 943 2010-06-30T19:27:21Z NaN 4 wikitext text/x-wiki Example '''carparts/tire/touring''' <pre> restitution = 0.1 tread = 0.25 rolling-resistance = 1.3e-2, 6.5e-6 # Lateral force a0=1.55 a1=-55 a2=1750 a3=1900 a4=7.2 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.65 b1=-110 b2=1800 b3=23.3 b4=410 b5=0.075 b6=0 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 # Aligning moment c0=2.2 c1=-4.3 c2=-4.4 c3=-1.9 c4=-9.6 c5=0.0225 c6=0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> Restitution defines tire restitution(not implemented atm). The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm There is a graphical tire parameters editor to adjust/review the parameters: http://svn.vdrift.net/viewvc.cgi 2735f46f00510623095a8565b5c51f13a8ae88f3 Car parameters for vdrift-2010-06-30 0 12 172 2010-06-30T19:05:13Z NaN 4 [[Car parameters]] moved to [[Tire parameters]]: Tire parameters article wikitext text/x-wiki #REDIRECT [[Tire parameters]] 952f42f085daee2998f44c0475195a1cd578473d 173 172 2010-06-30T19:07:29Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] Tire parameters: [[Tire parameters]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Wheel== <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 66942624504fea0288be1a882651625ac559e800 174 173 2010-06-30T19:07:45Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] Tire parameters: [[Tire parameters]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Wheel== <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 44e10e885a0f69eab2b5e8e64e01843f57d24896 175 174 2010-06-30T19:15:19Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] Tire parameters: [[Tire parameters]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== <pre> </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Wheel== <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 3854e04dcb1cc464d9e9b9fec52705527e6c5233 176 175 2010-06-30T19:27:39Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines the dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. ==Tire== <pre> </pre> ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Wheel== <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 7fed1c67aa3356658351d836337f75defab843fa 177 176 2010-06-30T19:59:42Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines the dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Camber and toe are relative to car. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel for ackermann = 0. A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. bf42b06b0fe62ab90c7da1b3cdf074dbe829ae0f 178 177 2010-06-30T20:01:03Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines the dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Camber and toe are relative to car. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel for ackermann = 0. A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 288f9126f5a79a45430459dee837cbec2a4e2ab0 179 178 2010-06-30T20:01:25Z NaN 4 /* Tire */ wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Camber and toe are relative to car. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel for ackermann = 0. A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 68d8851229eec2c778dd2cf6bbb5d66f6bf80760 180 179 2010-06-30T20:02:01Z NaN 4 /* Suspension */ wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. Camber and toe are relative to car. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel for ackermann = 0. A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. d084c54a7f378baadf2a2792030b4d110298ddfb 181 180 2010-06-30T20:03:47Z NaN 4 /* Suspension */ wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel for ackermann = 0. A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. acd267ff09817bd1015165d863d58941eab639ba 182 181 2010-06-30T20:05:08Z NaN 4 /* Suspension */ wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. 6cdfac010ba29442e9919e2db924affb83467acc 183 182 2010-07-01T08:47:30Z NaN 4 wikitext text/x-wiki Old car parameters (vdrift-2009-06-15 and older): [[Car_parameters(old)]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. c587ed58c05c76731625d9bd22e0f92c686e19ea Authors and contributors 0 6 52 51 2010-07-07T02:24:37Z Venzon 1 wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to write nearly all the source code for the game, and created everything in the game which is not attributed to someone else below. The physics engine in the game is the [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. ==Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. * rookie1 wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helps with testing and debugging, and has provided help improving the build system. He's also written a [http://www.superiorpapers.com/reasons.php buy term papers] much improved error logging system which is not in use yet. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * cotharyus has improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 TF] created the 360 ====Tracks==== * alexr has imported several very good tracks. * pwp71 has helped update many older tracks' parameters as new track features have become available. ==Ports== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] ported VDrift to Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] manages the VDrift port for FreeBSD. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] manages the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. ==Packagers== * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] has packaged VDrift for Slackware Linux and has helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] and Gonéri Le Bouder have both worked on Debian GNU/Linux packages for VDrift. * Gonéri Le Bouder has helped get VDrift into Arch Linux. 69db30d6d68984da36a42fc6e41df652c611d8aa 53 52 2010-07-07T02:29:33Z Venzon 1 wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to write nearly all the source code for the game, and created everything in the game which is not attributed to someone else below. The physics engine in the game is the [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. ==Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. * rookie1 wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helps with testing and debugging, and has provided help improving the build system. He's also written a much improved error logging system which is not in use yet. * [http://vdrift.net/users.php?mode=profile&uid=5379 NaN] has rewritten the physics code, added car color selection, and continues to fix bugs and add new features. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * cotharyus has improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 TF] created the 360 ====Tracks==== * alexr has imported several very good tracks. * pwp71 has helped update many older tracks' parameters as new track features have become available. ==Ports== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] ported VDrift to Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] manages the VDrift port for FreeBSD. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] manages the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. ==Packagers== * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] has packaged VDrift for Slackware Linux and has helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] and Gonéri Le Bouder have both worked on Debian GNU/Linux packages for VDrift. * Gonéri Le Bouder has helped get VDrift into Arch Linux. 3a5b4c912a65a849e194d9febe446899ab70b66b 55 54 2010-07-11T17:44:16Z Venzon 1 Reverted edits by [[Special:Contributions/Alysia|Alysia]] ([[User_talk:Alysia|Talk]]); changed back to last version by [[User:Venzon|Venzon]] wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to write nearly all the source code for the game, and created everything in the game which is not attributed to someone else below. The physics engine in the game is the [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. ==Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. * rookie1 wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helps with testing and debugging, and has provided help improving the build system. He's also written a much improved error logging system which is not in use yet. * [http://vdrift.net/users.php?mode=profile&uid=5379 NaN] has rewritten the physics code, added car color selection, and continues to fix bugs and add new features. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * cotharyus has improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 TF] created the 360 ====Tracks==== * alexr has imported several very good tracks. * pwp71 has helped update many older tracks' parameters as new track features have become available. ==Ports== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] ported VDrift to Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] manages the VDrift port for FreeBSD. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] manages the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. ==Packagers== * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] has packaged VDrift for Slackware Linux and has helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] and Gonéri Le Bouder have both worked on Debian GNU/Linux packages for VDrift. * Gonéri Le Bouder has helped get VDrift into Arch Linux. 3a5b4c912a65a849e194d9febe446899ab70b66b 57 56 2010-08-14T15:08:48Z Venzon 1 Reverted edits by [[Special:Contributions/Jennifertaylor|Jennifertaylor]] ([[User_talk:Jennifertaylor|Talk]]); changed back to last version by [[User:Venzon|Venzon]] wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to write nearly all the source code for the game, and created everything in the game which is not attributed to someone else below. The physics engine in the game is the [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. ==Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. * rookie1 wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helps with testing and debugging, and has provided help improving the build system. He's also written a much improved error logging system which is not in use yet. * [http://vdrift.net/users.php?mode=profile&uid=5379 NaN] has rewritten the physics code, added car color selection, and continues to fix bugs and add new features. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * cotharyus has improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 TF] created the 360 ====Tracks==== * alexr has imported several very good tracks. * pwp71 has helped update many older tracks' parameters as new track features have become available. ==Ports== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] ported VDrift to Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] manages the VDrift port for FreeBSD. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] manages the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. ==Packagers== * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] has packaged VDrift for Slackware Linux and has helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] and Gonéri Le Bouder have both worked on Debian GNU/Linux packages for VDrift. * Gonéri Le Bouder has helped get VDrift into Arch Linux. 3a5b4c912a65a849e194d9febe446899ab70b66b Enabling force feedback in kernel 0 31 478 477 2010-07-27T01:34:03Z Venzon 1 Reverted edits by [[Special:Contributions/AmandaCusack|AmandaCusack]] ([[User_talk:AmandaCusack|Talk]]); changed back to last version by [[User:Cborivant|Cborivant]] wikitext text/x-wiki Here is how to enable force feedback on Ubuntu 8.10 64 bits kernels (should also work on 32 bits ones): ==For the G25 owners== If you use a G25 wheel, you need to patch your kernel to be able to use it in its native mode First create a patch file named G25.patch for the kernel ( patches for 2.6.27 and 2.6.28 are provided ). === kernel 2.6.27 === diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c 2009-02-23 22:21:27.000000000 +0100 @@ -57,6 +57,7 @@ { 0x46d, 0xc286, hid_lgff_init }, /* Logitech Force 3D Pro Joystick */ { 0x46d, 0xc294, hid_lgff_init }, /* Logitech Formula Force EX */ { 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */ + { 0x46d, 0xc299, hid_lgff_init }, /* Logitech G25 wheel */ { 0x46d, 0xca03, hid_lgff_init }, /* Logitech MOMO force wheel */ #endif #ifdef CONFIG_LOGIRUMBLEPAD2_FF diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c 2009-02-23 22:23:22.000000000 +0100 @@ -55,6 +55,7 @@ { 0x046d, 0xc286, ff_joystick }, { 0x046d, 0xc294, ff_joystick }, { 0x046d, 0xc295, ff_joystick }, + { 0x046d, 0xc299, ff_joystick }, { 0x046d, 0xca03, ff_joystick }, }; diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c 2009-03-13 18:54:14.000000000 +0100 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c 2009-02-23 22:25:45.000000000 +0100 @@ -316,6 +316,7 @@ #define USB_DEVICE_ID_LOGITECH_HARMONY_64 0xc14f #define USB_DEVICE_ID_LOGITECH_EXTREME_3D 0xc215 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 +#define USB_DEVICE_ID_LOGITECH_WHEELG25 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c @@ -625,6 +626,7 @@ { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEELG25, HID_QUIRK_NOGET }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0, HID_QUIRK_NOGET }, { USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, === kernel 2.6.28 === diff -Naur linux-source-2.6.28/drivers/hid/hid-core.c linux-source-2.6.28.patched/drivers/hid/hid-core.c --- linux-source-2.6.28/drivers/hid/hid-core.c 2009-04-08 06:38:33.000000000 +0200 +++ linux-source-2.6.28.patched/drivers/hid/hid-core.c 2009-04-10 14:15:27.000000000 +0200 @@ -1290,6 +1290,7 @@ { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FORCE3D_PRO) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, diff -Naur linux-source-2.6.28/drivers/hid/hid-ids.h linux-source-2.6.28.patched/drivers/hid/hid-ids.h --- linux-source-2.6.28/drivers/hid/hid-ids.h 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-ids.h 2009-04-10 14:12:44.000000000 +0200 @@ -291,6 +291,7 @@ #define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 +#define USB_DEVICE_ID_LOGITECH_G25_WHEEL 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c diff -Naur linux-source-2.6.28/drivers/hid/hid-lg.c linux-source-2.6.28.patched/drivers/hid/hid-lg.c --- linux-source-2.6.28/drivers/hid/hid-lg.c 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-lg.c 2009-04-10 14:14:17.000000000 +0200 @@ -304,6 +304,8 @@ .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2), .driver_data = LG_FF }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL), + .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), .driver_data = LG_FF2 }, { } ==Enabling force feedback in the kernel== ===Prepare to compile a kernel=== Make sure U have everything needed to compile your kernel : sudo apt-get install fakeroot build-essential makedumpfile libncurses5 libncurses5-dev kernel-package sudo apt-get build-dep linux Get the kernel source code : sudo apt-get install linux-source Now we are ready to start : Prepare your environment: mkdir ~/src cd ~/src tar xjvf /usr/src/linux-source-<version>.tar.bz2 cd linux-source-<version> ===Apply the G25 patch if needed=== copy the G25.patch file into the source directory ( ~/src ) and patch -p1 <../G25.patch the output should be something like that: patching file drivers/hid/usbhid/hid-ff.c patching file drivers/hid/usbhid/hid-lgff.c patching file drivers/hid/usbhid/hid-quirks.c ===Configure the new kernel=== Get the running kernel configuration: cp -vi /boot/config-`uname -r` .config Adjust the kernel configuration: make oldconfig make menuconfig Go to Device Drivers , and HID Devices and enable the following options Force feedback support (EXPERIMENTAL) PID device support Logitech devices support Logitech Rumblepad 2 support PantherLord/GreenAsia based device support ThrustMaster devices support Zeroplus based game controller support With the 2.6.27 kernel on Ubuntu 8.10, I have to disable paravirtualized guest support otherwise the kernel cleaning fail. This is not needed on 2.6.28 on Ubuntu 9.04 beta (2.6.28.11) Go to Processor type and features and disable the following: Paravirtualized guest support ===Compile and package the new kernel=== make-kpkg clean fakeroot make-kpkg --initrd --append-to-version=-ff kernel-image kernel-headers you now have 2 new package files in ~/src. ===Install the new kernel=== sudo dpkg -i linux-image-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb linux-headers-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb 664b2545b8273e8f6c6b8f5b07ee6b3afd99744e Configuring the display 0 21 353 352 2010-09-30T14:29:10Z Venzon 1 Undo revision 759 by [[Special:Contributions/Julianmarble]] ([[User talk:Julianmarble]]) wikitext text/x-wiki Configuring the display is done by editing [[VDrift.config]] manually, or by changing the settings in the '''Options -> Display''' and '''Options -> Display -> Advanced''' menus. ==Display Options== ===Resolution=== * type: integer pair * settings: display.width, display.height * values: depends on the file '''vdrift/data/lists/videomodes''' and the resolutions your video card makes available Change the resolution of the game display. See [[Adding video modes]] for how to make new video modes available to choose from. ===Fullscreen=== * type: boolean * setting: display.fullscreen * values: on, off Make the game take up the entire screen. ===Speed Units=== * type: boolean * setting: display.mph * values: on = "MPH", off = "km/h" Change the units that speed is displayed in. ===Framerate Counter=== * type: boolean * setting: display.show_fps * values: on, off Enable/disable the framerate counter. ===Heads Up Display=== * type: boolean * setting: display.show_hud * values: on, off Enable/disable the heads up display. ===Menu Skin=== * type: string * setting: display.skin * values: default "simple", the name of any directory in '''vdrift/data/skins/''' Change the graphics and layout of the VDrift menus. ===Input Graph=== * type: boolean * setting: display.input_graph * values: on, off Visualize the steering and acceleration/braking on screen. ==Advanced Display Options== ===Color Depth=== * type: integer * setting: display.depth * values: 16, 32 Adjust the amount of colors available. ===Texture Size=== * type: string * setting: display.texture_size * values: "small", "medium", "large" Change the size of the textures displayed. ===View Distance=== * type: floating-point * setting: display.view_distance * values: any positive decimal number of meters Change the maximum view distance. ===Anisotropic Filtering=== * type: integer * setting: display.anisotropic * values: depends on your video card Set anisotropic filtering level for textures. ===Antialiasing=== * type: integer * setting: display.antialiasing * values: depends on your video card Set the full scene antialiasing level. ===Car Shadows=== * type: boolean * setting: display.car_shadows * values: on, off Draw simple static shadows beneath the cars. ===Field of View=== * type: floating-point * setting: display.FOV * values: any positive decimal number Field of view angle in the vertical direction. ===Lighting Quality=== * type: integer * setting: display.lighting * values: 0, 1 Set how good the lighting looks during gameplay. 0 is Low, which is totally static lighting. 1 is Medium, static cube-mapped lighting. ===Reflection Quality=== * type: integer * setting: display.reflections * values: 0, 1, 2 Set how good the reflections look during gameplay. 0 is Low, static sphere-mapped reflections. 1 is Medium, static cube-mapped reflections, and 2 is High, dynamic cube-mapped reflections. 29c1e96d8cd0eaaeb25f4d88da67a9bda208db25 Sound/Audio Development 0 78 916 915 2010-09-30T14:32:23Z Venzon 1 Reverted edits by [[Special:Contributions/Marriedwithkids|Marriedwithkids]] ([[User_talk:Marriedwithkids|Talk]]); changed back to last version by [[User:Fangbaby|Fangbaby]] wikitext text/x-wiki These are some preliminary recordings of a miata. Discussion is welcomed here and in the forum thread: [http://vdrift.net/Forum/viewtopic.php?t=816 Collecting Audio] *Notes: **Inside - 2 microphones in a 180 degree stereo setup behind the driver headrest. **Behind - 2 Microphones in a 45 degrees stereo setup 7 feet behind the car. **Some filenames have odd case, I'll make all lowcase standard in the future. **I did very little to the raw audio other than a little compression to lessen the dynamic range. **Some of these are very quiet, such as the 1k inside. ---- *Miata sounds: **[http://fangbaby.com/share/vdrift/01%20-%201k%20inside.wav 1k inside] **[http://fangbaby.com/share/vdrift/02%20-%202k%20inside.wav 2k inside] **[http://fangbaby.com/share/vdrift/03%20-%203k%20inside.wav 3k inside] **[http://fangbaby.com/share/vdrift/04%20-%204k%20inside.wav 4k inside] **[http://fangbaby.com/share/vdrift/05%20-%205k%20inside.wav 5k inside] **[http://fangbaby.com/share/vdrift/06%20-%206k%20inside.wav 6k inside] **[http://fangbaby.com/share/vdrift/07%20-%207k%20inside.wav 7k inside] **[http://fangbaby.com/share/vdrift/08%20-%20Revlimit%20Inside.wav RevLimit inside] **[http://fangbaby.com/share/vdrift/09%20-%20750to7k%20inside.wav 750to7k inside] **[http://fangbaby.com/share/vdrift/10%20-%201k%20Behind.wav 1k behind] **[http://fangbaby.com/share/vdrift/11%20-%202k%20Behind.wav 2k behind] **[http://fangbaby.com/share/vdrift/12%20-%203k%20Behind.wav 3k behind] **[http://fangbaby.com/share/vdrift/13%20-%204k%20Behind.wav 4k behind] **[http://fangbaby.com/share/vdrift/14%20-%205k%20Behind.wav 5k behind] **[http://fangbaby.com/share/vdrift/15%20-%206k%20Behind.wav 6k behind] **[http://fangbaby.com/share/vdrift/16%20-%207k%20behind.wav 7k behind] **[http://fangbaby.com/share/vdrift/17%20-%20Revlimit%20behind.wav RevLimit behind] **[http://fangbaby.com/share/vdrift/18%20-%20Start%20Behind.wav Start behind] **[http://fangbaby.com/share/vdrift/19%20-%20Stop%20Behind.wav stop behind] **[http://fangbaby.com/share/vdrift/20%20-%20Moving.wav Moving Inside] **[http://fangbaby.com/share/vdrift/21%20-%20Moving2.wav More Moving Inside] f403b611cbafe243157409acd7c9be4de171394b Useful links 0 84 960 959 2010-12-11T10:59:19Z Timo 6 3 wikitext text/x-wiki ==VDrift== * [http://vdrift.net/ Home] * [http://cars.vdrift.net/ Cars] * [http://vdrift.net/Forum/ Forum] * [http://svn.vdrift.net/ SVN Repository] * [http://code.google.com/p/vdrift/issues/list Issue Tracker] * [http://vdrift.net/staticpages/index.php?page=irc-chat Chat] ==Driving Simulation Information== * [http://www.miata.net/sport/Physics/ Physics of Racing Series] articles * [http://www.cescg.org/CESCG-2003/SDeak/index.html Dynamical Simulation in a Driving Simlator] paper * [http://www.racesimcentral.com/ Race Sim Central] * [http://www.racedepartment.com/content/ RaceDepartment] ==Open Driving Simulators and Racing Games== * [http://torcs.org/ The Open Race Car Simulator (TORCS)] * [http://sourceforge.net/projects/trigger-rally/ Trigger Rally] * [http://vamos.sourceforge.net/ Vamos Automotive Simulator] * [http://speed-dreams.sourceforge.net/ Speed Dreams] * [http://supertuxkart.sourceforge.net/ Super TuxCart] * [http://code.google.com/p/vdrift-ogre/ vdrift-ogre] * [http://www.racer.nl/ Racer] [[Category:External Resources]] [[Category:Expand]] [[Category:Reformat]] 40d144d843e230de5e10bf5103e42db63e5f819a Options.config 0 67 839 838 2010-12-11T11:34:49Z Timo 6 3 wikitext text/x-wiki VDrift has a set of options which can be added to menus, referenced by the game, and used as a template for a player's settings. These options are defined in '''data/settings/options.config''' in the [[Configfile format]] that VDrift uses for many of its other text files. Once defined, these options can be referred to by the menus to do several things, including: pick default values for options, to get names, descriptions, and lists of values for options, check the type of options, and much more. {{note|The options.config file is '''not''' the place where the user's settings are stored. Users should never need to edit this file. User options are set in [[VDrift.config]].}} The options tell what values are available to the user for a given setting. This may seem confusing. Here's an example definition of an option in the file: [ option-17 ] cat = display name = view_distance title = View Distance desc = Change the maximum view distance. type = float default = 500.0 values = list num_vals = 5 opt00 = Very Low (0.25 km) val00 = 250.0 opt01 = Low (0.5 km) val01 = 500.0 opt02 = Medium (1 km) val02 = 1000.0 opt03 = High (2.5 km) val03 = 2500.0 opt04 = Very High (10 km) val04 = 10000.0 The first line has the option ID number. This must be in the format <code>[ option-## ]</code> and number must be less than num_options. No two widgets should have the same ID. The first field, <code>cat</code>, is just for categorization. This option is in the display category. Next comes the option's name, which combined with the category, makes up the name by which the option is referred to in the menu (here, "display.view_distance"). The <code>title</code> field tells the human-readable name for this option. <code>desc</code> tells a little more about the option, this usually goes in the tip for the option in the menu. <code>type</code> is very important because it tells the game how to interpret the values given to it for each option. This particular option is a floating point option, which means it has a decimal, so it is <code>type</code> float. <code>default</code> is, as you probably guessed, the default value for the option. The <code>values</code> needs a little extra explanation. In this case it is "list" which means that the possible values for the option will be listed along with this option definition. Sometimes <code>values</code> is given an alternate value which tells the game to get the list of values from some other special place. Since this option needs a list of values, we define the list: <code>num_vals</code> tells how many possible options there are; and the following <code>opt-##</code> and <code>val-##</code> fields describe the displayed name for the value, and the actual value, respectively. The <code>opt-##</code> fields are assumed to be strings, but the <code>val-##</code> fields must be of the same type as the type of the object, as must the <code>default</code> setting described earlier. Putting the wrong type of values here can cause very unexpected results. [[Category:Files]] [[Category:Expand]] 5efa29d53f5aa06b68db1a54a82e6d65136cb3a5 Old List of cars 0 57 716 715 2010-12-11T11:58:28Z Timo 6 3 wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more cars|this link]] for information about how to install new cars. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: 2002 F1 car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 [[Category:Cars]] [[Category:Update]] 5e889ef89b371468e1651ba6b23f8a24f0ccd557 717 716 2010-12-11T14:46:08Z Timo 6 3 wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more cars]] for information about how to install new cars. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: 2002 F1 car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 [[Category:Cars]] [[Category:Update]] 0892e0aef9b56832f222064872e25aa38424adf7 718 717 2010-12-11T15:21:21Z Timo 6 3 wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more cars]] for information about how to install new cars. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: 2002 F1 car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 [[Category:Cars]] [[Category:Update]] 0e269bba3d08c28052d2113234a559720e2e57ed VDrift.config 0 88 1034 1033 2010-12-11T12:03:18Z Timo 6 3 /* Example */ wikitext text/x-wiki VDrift.config is the main settings file for VDrift. It usually stays in the user's home directory or user settings space, and is in the [[configfile format]]. It is not the only file VDrift uses (see also [[options.config]], [[controls]], and others). VDrift does not use any kind of registry or configuration database. The options available to this configuration file are the ones defined in [[options.config]]. ==Location== VDrift.config is located inside the [[User settings directory]]. ==Example== This is the author's current VDrift.config. [control] autoclutch = true autotrans = true button_ramp = 5 mousegrab = true speed_sens_steering = 1 [display] FOV = 45 anisotropic = 0 antialiasing = 0 bloom = true camerabounce = 1 contrast = 1 depth = 16 fullscreen = true height = 1050 input_graph = true language = English lighting = 0 mph = true normalmaps = true racingline = true reflections = 1 shaders = true shadow_distance = 1 shadow_quality = 1 shadows = true show_fps = true show_hud = true skin = simple texture_size = medium trackmap = true view_distance = 1000 width = 1680 zdepth = 16 [game] ai_difficulty = 1 antilock = true camera_mode = chase number_of_laps = 1 opponent = XS opponent_color = 1,1,1 opponent_color_blue = 1.000000 opponent_color_green = 0.000000 opponent_color_red = 0.000000 opponent_paint = 00 player = XS player_color = 1,1,1 player_color_blue = 1.000000 player_color_green = 0.000000 player_color_red = 0.000000 player_paint = 00 record = false reverse = false selected_replay = 0 track = paulricard88 traction_control = true [joystick] calibrated = false ff_device = /dev/input/event0 ff_gain = 2 ff_invert = false hgateshifter = false two_hundred = false type = joystick [sound] volume = 1 ==Options== ===Main section=== ====main.version==== The version of the game. ===Display section=== See [[Configuring the display]] for detailed descriptions of each option. ===Game section=== See [[Starting the game]] for detailed descriptions of each option. ===Sound section=== See [[Configuring the sound]] for more information. ====sound.volume==== The gain for the sound effects in-game. ====sound.music_volume==== There is currently no in-game music, this has no effect. ===Network section=== See [[Network play]] for more information. ====network.host_game==== Host a game or not (join another host). ====network.server_ip==== IP of host to connect to. ====network.server_port==== Port of host to connect to, or if hosting, port to run server on. ===Control, Joystick and Mouse sections=== For information on the Control and Joystick settings, see [[Configuring the controls]]. Mouse settings are now deprecated. [[Category:Files]] [[Category:Update]] 647c5e7c850a583520e2050247ead30c198a6f02 1035 1034 2010-12-11T14:37:04Z Timo 6 3 Updated example option sections to current. wikitext text/x-wiki VDrift.config is the main settings file for VDrift. It usually stays in the user's home directory or user settings space, and is in the [[configfile format]]. It is not the only file VDrift uses (see also [[options.config]], [[controls]], and others). VDrift does not use any kind of registry or configuration database. The options available to this configuration file are the ones defined in [[options.config]]. ==Location== VDrift.config is located inside the [[User settings directory]]. ==Example== This is the author's current VDrift.config. [control] autoclutch = true autotrans = true button_ramp = 5 mousegrab = true speed_sens_steering = 1 [display] FOV = 45 anisotropic = 0 antialiasing = 0 bloom = true camerabounce = 1 contrast = 1 depth = 16 fullscreen = true height = 1050 input_graph = true language = English lighting = 0 mph = true normalmaps = true racingline = true reflections = 1 shaders = true shadow_distance = 1 shadow_quality = 1 shadows = true show_fps = true show_hud = true skin = simple texture_size = medium trackmap = true view_distance = 1000 width = 1680 zdepth = 16 [game] ai_difficulty = 1 antilock = true camera_mode = chase number_of_laps = 1 opponent = XS opponent_color = 1,1,1 opponent_color_blue = 1.000000 opponent_color_green = 0.000000 opponent_color_red = 0.000000 opponent_paint = 00 player = XS player_color = 1,1,1 player_color_blue = 1.000000 player_color_green = 0.000000 player_color_red = 0.000000 player_paint = 00 record = false reverse = false selected_replay = 0 track = paulricard88 traction_control = true [joystick] calibrated = false ff_device = /dev/input/event0 ff_gain = 2 ff_invert = false hgateshifter = false two_hundred = false type = joystick ==Options== ===Control section=== For information on the Control settings, see [[Configuring the controls]]. ===Display section=== See [[Configuring the display]] for detailed descriptions of each option. ===Game section=== See [[Starting the game]] for detailed descriptions of each option. ===Joystick section=== For information on the Joystick settings, see [[Configuring the controls]]. ===Sound section=== See [[Configuring the sound]] for more information. ====volume==== The gain for the sound effects in-game. [[Category:Files]] [[Category:Update]] 24a501ef1e97e159c8918445acb6a41f1874fbda Old Method of Installing on Mac OS X 0 64 809 808 2010-12-11T12:55:43Z Timo 6 3 /* Binary Install */ wikitext text/x-wiki ==Binary Install== * If you aren't running Mac OS X 10.4 "Tiger" or higher you must install [http://www.openal.org/openal_webstf/downloads/OpenAL_Installer_OSX.dmg OpenAL] first. (To find out what version of Mac OS X you are running, click the  [apple symbol] at the top left of the screen. Select '''About This Mac''' from the drop down menu and check the ''Version'' section of the window that appears.) * Download the latest VDrift release for Mac OS X from the [http://vdrift.net/ homepage] or [http://sourceforge.net/projects/vdrift/files/vdrift/vdrift-2010-06-30/ sourceforge]. * Double click the resulting ''.dmg'' file (probably in your download folder). * Drag or copy all the files and folders inside to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. ==Known Problems== * On-the-fly resolution-switching doesn't work [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] [[Category:Update]] c0ee035ef40f526804955decd87f618c924f761b 810 809 2010-12-11T12:56:41Z Timo 6 3 wikitext text/x-wiki ==Binary Install== * If you aren't running Mac OS X 10.4 "Tiger" or higher you must install [http://www.openal.org/openal_webstf/downloads/OpenAL_Installer_OSX.dmg OpenAL] first. (To find out what version of Mac OS X you are running, click the  [apple symbol] at the top left of the screen. Select '''About This Mac''' from the drop down menu and check the ''Version'' section of the window that appears.) * Download the latest VDrift release for Mac OS X from the [http://vdrift.net/ homepage] or [http://sourceforge.net/projects/vdrift/files/vdrift/vdrift-2010-06-30/ sourceforge]. * Double click the resulting ''.dmg'' file (probably in your download folder). * Drag or copy all the files and folders inside to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] d89d8a605d85d9c9791e68b5e7e41b2373142d81 Configuring the sound 0 22 362 361 2010-12-11T14:29:24Z Timo 6 3 Added the vdrift.config option wikitext text/x-wiki Currently VDrift has 3D sound using OpenAL. In-game sounds include engine RPM sound and tire sounds. The game doesn't have any music yet. ==Sound settings== Configuring the sound is done by editing ''VDrift.config'' manually, or by changing the settings in the Options -> Sounds menu. As there is no game music yet, the only option is the volume of game sounds: [sound] volume = 1 {{note|The following sections refer mostly to the Linux version of VDrift.}} ==Troubleshooting sound== If the engine sound is very broken or choppy sounding, and you hear some noise or crackling, you need to tell OpenAL to try to use a different sound backend. If you don't have an ~/.openalrc file, create it with these contents, or modify your current one to look like this: (define devices '(native alsa sdl arts esd null)) (define alsa-device "dsp0") (define speaker-num 2) ;(define sampling-rate 22050) The important line here is the "define devices" line, OpenAL attempts to use each of those sound output methods in order. It uses the first one that works; in some cases native will work best, in other cases perhaps alsa. If Gnome is running its sound daemon, esd would be the best choice, while KDE usually uses artsd. ==Known bugs== If you don't hear lots of crackling and choppiness, but you still hear a 'click, click, click' sound as the engine sample loops, this is a bug in OpenAL for Linux (or a feature we haven't found a way around...). We've heard there is a fix in the works from the OpenAL project. Also, certain cars have engines that rev very high, and our engine sound system can't pitch shift high enough to play the sound at the correct frequency, after it hits the maximum pitch. This is currently only obvious on the F1 car. ==OpenAL Utility Toolkit== On older versions of OpenAL, ALUT was part of the OpenAL library. At some point not easily markable with a version number, ALUT became a separate library. This changed the way VDrift must be built, as well as some of the sound code. To accomodate users of the old version of OpenAL with ALUT included, there is a switch in the SCons build system used on Linux and FreeBSD. To compile VDrift with "old OpenAL" support, simply add the option to the scons compile command: scons old_openal=1 For more information on the build system see [[Using SCons]]. [[Category:Configuration]] [[Category:Update]] 67761ed6d4a08e566a784262cc9527e274cdbaaa 363 362 2010-12-11T14:33:33Z Timo 6 3 wikitext text/x-wiki Currently VDrift has 3D sound using OpenAL. In-game sounds include engine RPM sound and tire sounds. The game doesn't have any music yet. ==Sound settings== Configuring the sound is done by editing [[VDrift.config]] manually, or by changing the settings in the Options -> Sounds menu. As there is no game music yet, the only option is the volume of game sounds: [sound] volume = 1 {{note|The following sections refer mostly to the Linux version of VDrift.}} ==Troubleshooting sound== If the engine sound is very broken or choppy sounding, and you hear some noise or crackling, you need to tell OpenAL to try to use a different sound backend. If you don't have an ~/.openalrc file, create it with these contents, or modify your current one to look like this: (define devices '(native alsa sdl arts esd null)) (define alsa-device "dsp0") (define speaker-num 2) ;(define sampling-rate 22050) The important line here is the "define devices" line, OpenAL attempts to use each of those sound output methods in order. It uses the first one that works; in some cases native will work best, in other cases perhaps alsa. If Gnome is running its sound daemon, esd would be the best choice, while KDE usually uses artsd. ==Known bugs== If you don't hear lots of crackling and choppiness, but you still hear a 'click, click, click' sound as the engine sample loops, this is a bug in OpenAL for Linux (or a feature we haven't found a way around...). We've heard there is a fix in the works from the OpenAL project. Also, certain cars have engines that rev very high, and our engine sound system can't pitch shift high enough to play the sound at the correct frequency, after it hits the maximum pitch. This is currently only obvious on the F1 car. ==OpenAL Utility Toolkit== On older versions of OpenAL, ALUT was part of the OpenAL library. At some point not easily markable with a version number, ALUT became a separate library. This changed the way VDrift must be built, as well as some of the sound code. To accomodate users of the old version of OpenAL with ALUT included, there is a switch in the SCons build system used on Linux and FreeBSD. To compile VDrift with "old OpenAL" support, simply add the option to the scons compile command: scons old_openal=1 For more information on the build system see [[Using SCons]]. [[Category:Configuration]] [[Category:Update]] 003a40139f8a5555f35e88c6813673faec6109e5 Getting more cars 0 34 495 494 2010-12-11T14:43:01Z Timo 6 3 Added svn method wikitext text/x-wiki This article explains how to get more cars for VDrift and how to install them. ==Getting cars== * A number of cars can be found on the [http://cars.vdrift.net cars.vdrift.net] website. Navigate to the car you'd like to download and if the car status says it's playable in VDrift, download the .zip or .tar.gz file. * You can also download cars from the svn. Click the links in [[List of cars]] to go to the page for each car. Click the 'Download GNU Tarball' link, untar and place the resulting folder in '''vdrift/data/cars''' to use. ==Installing cars== You should have a .zip or .tar.gz file at this point. The .zip or .tar.gz extensions are both file compression formats. Uncompress the files with a decompression program such as the free tool [http://www.7-zip.org/ 7zip]. This process should create a folder with the name of the car. Move that folder (which should contain files like about.txt and body.joe) to your VDrift/data/cars folder. You're done! [[Category:Cars]] 06206cd7e8d4c14e5b00411afec2535654969278 496 495 2010-12-11T14:44:46Z Timo 6 3 wikitext text/x-wiki This article explains how to get more cars for VDrift and how to install them. ==Getting cars== * A number of cars can be found on the [http://cars.vdrift.net cars.vdrift.net] website. Navigate to the car you'd like to download and if the car status says it's playable in VDrift, download the .zip or .tar.gz file. * You can also download cars from the svn. Click the links in [[List of cars]] to go to the page for each car then click the 'Download GNU Tarball' link. ==Installing cars== You should have a .zip or .tar.gz file at this point. The .zip or .tar.gz extensions are both file compression formats. Uncompress the files with a decompression program such as the free tool [http://www.7-zip.org/ 7zip]. This process should create a folder with the name of the car. Move that folder (which should contain files like about.txt and body.joe) to '''vdrift/data/cars''' folder. Run VDrift and your new car will be ready to drive! [[Category:Cars]] d22d17e734aecb96c7dafc566ce2dfaa2ea47c76 Old List of Tracks 0 56 703 702 2010-12-11T15:24:06Z Timo 6 3 Updated to include latest tracks. wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more tracks]] for information about how to install new tracks. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/a1ring/ A1 Ring] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/bahrain/ Bahrain] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/barcelona/ Barcelona] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/brands/ Brands Hatch] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/charade70/ Charade 1970] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/detroit/ Detroit] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dijon/ Dijon-Prenois] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dirt-3/ Australian Countryside] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/estoril88/ Estoril 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/fuji/ Fuji] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hockenheim/ Hockenheim] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hungaroring06/ Hungaroring 2006] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/imola2005/ Imola 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/indianhill/ Indian Hill] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/interlagos/ Interlagos] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jarama/ Jarama] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jerez88/ Jerez 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/kyalami/ Kyalami] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lagunaseca/ Laguna Seca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lemans/ Le Mans] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/magny/ Magny] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/melbourne/ Melbourne] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco/ Monaco] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco88/ Monaco 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/montreal/ Montreal] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza/ Monza] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza88/ Monza 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/mosport/ Mosport] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/nuerburgring_nordschleife/ Nürburgring Nordschleife] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Parking Lot] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Pau] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/paulricard88/ Paul Ricard 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ring2007/ Ring 2007] (Nürburgring Nordschleife 2007) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/road_atlanta/ Road Atlanta] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/rouen/ Rouen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ruudskogen/ Ruudskogen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/sepang/ Sepang] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa/ Spa-Francorchamps] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa2008/ Spa-Francorchamps 2008] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/suzuka2005/ Suzuka 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/vir/ Virgina International] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/weekend/ Weekend Drive] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/zandvoort/ Zandvoort] [[Category:Tracks]] db2479802efb82d6325864dc2ec3090f81293387 Old List of cars 0 57 719 718 2010-12-11T15:31:12Z Timo 6 3 remove from update category wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more cars]] for information about how to install new cars. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: 2002 F1 car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 [[Category:Cars]] 9cbed90664b7465fac48cf50563b760e89da94a0 Reporting problems 0 75 885 884 2010-12-11T15:58:30Z Timo 6 3 Removed repetition and made generally more concise. wikitext text/x-wiki This page will give you a good idea of how to report problems to the project in a useful way. ==Before reporting== Here are some things you should do before reporting issues to us: * Make sure you've got the latest version of VDrift from the [http://vdrift.net/ VDrift homepage]. * Read the release notes for the version of VDrift you are using, and the platform you are running it on. Be sure to check the Known Issues section. * Make sure you've got the latest drivers installed for your video card. * Find a way to reproduce the problem, if you can. * Search the forums for topics already containing your problem. At least read through the most recent [http://vdrift.net/Forum/viewforum.php?f=1 Help] and [http://vdrift.net/Forum/viewforum.php?f=3 Bugs] posts to make sure this isn't already being discussed. If it's a big problem, the likelihood is that there's a topic about on the front page of the site. ==Tips for reporting problems== If you've done everything above, and still have a problem, report the issue in the [http://vdrift.net/Forum/viewforum.php?f=1 Help] or [http://vdrift.net/Forum/viewforum.php?f=3 Bugs] forums, following these tips: * Put a meaningful title on your thread. ** "Please help me" or "problem with game" do not tell us anything at all. You need not say that there's a problem, after all you are in the Help forum. ** Here are examples of good topics: "Car won't shift gears", "lap is not triggered", "AI car turns wrong way", "HUD is not drawn". These topics are all short, but tell us what the topic is about before we read it. It is also much easier to search through topics when they have good titles. * Make sure you provide every bit of information you know, even if you think we might not need to know it. This will help us reproduce and fix the problem faster. ** Always include details about your hardware, operating system and library versions. This helps us tell where the problem lies. We can't help or begin to debug a problem until we know where it is. There are many more things that cause problems besides the game code - problems can be caused by hardware (including CPU, memory, video card, sound card, video memory), operating system, drivers (for video and sound, mainly), or the libraries used on your system (this applies mainly to Linux and FreeBSD). ** Give as many details about how to reproduce it as possible. ** If you can, include a screenshot of your problem. We provide space in our [http://vdrift.net/Gallery/admin.php?album_id=0&mode=upload gallery] where you can upload your shots. * Use your very best English. It's the only language we all understand. The better you write, the easier and quicker it is for us to understand your problem. We understand if you make a few mistakes, but please do your best. ** If you are not a native English speaker, we will do our very best to understand you. ** If you are a native English speaker, we should not have to spend extra time trying to decipher your post, just because you are too lazy to spell correctly and use correct grammar and punctuation. ** These things are sometimes hard to describe. Take your time and write as much as you need to tell us about your problem. * Check back regularly after reporting a problem. We may have questions or possible solutions, as well as tests we may need you to run so we can discover more about how the game runs on your system. Try to respond as quickly as possible, and we'll do the same. ==Examples of reports== Here's a bad example of a bug report: Topic: HELP OH NO!!!!!! when i start up the game it shows some stuff and then goes away what do i do how do u fix it Here's a good example of a bug report: Topic: Crash in latest Windows release Hi, I downloaded the full version of VDrift for Windows (version 2007-03-23) and it crashes whenever I try to start a new game. The menus all function correctly. My system is Windows XP SP2, P4 2 GHz CPU, 1 GB RAM and GeForce 5600 video card with nVidia drivers 9.4.3.2. [[Category:General Info]] 6c40d852e158eb26c377681080b8f79e70e014d5 Useful links 0 84 961 960 2010-12-11T17:31:04Z Timo 6 3 Added descriptions wikitext text/x-wiki ==VDrift== * [http://vdrift.net/ Home] - Homepage of the VDrift project. * [http://cars.vdrift.net/ Cars] - VDrift cars database. * [http://vdrift.net/Forum/ Forum] - Discuss new features and development, report bugs and get help with problems in the forums. * [http://svn.vdrift.net/ SVN Repository] - Find the latest development version here. * [http://code.google.com/p/vdrift/issues/list Issue Tracker] - Tracks the fixing of bugs and implementing of new features. * [http://vdrift.net/staticpages/index.php?page=irc-chat Chat] - IRC channel so you can talk to us directly. ==Driving Simulation Information== * [http://www.miata.net/sport/Physics/ Physics of Racing] - A series of articles about the physics of racing cars. * [http://www.cescg.org/CESCG-2003/SDeak/index.html Dynamical Simulation in a Driving Simulator] - A paper that addresses some important aspects of building a graphical model and a dynamical model for a driving simulator. * [http://www.racesimcentral.com/ Race Sim Central] - Racing simulation news and forums. * [http://www.racedepartment.com/content/ RaceDepartment] - Racing simulation community. ==Open Driving Simulators and Racing Games== * [http://torcs.org/ The Open Race Car Simulator (TORCS)] - A car racing simulation focusing on AI racing and research. It can also be used as a ordinary car racing game too. * [http://sourceforge.net/projects/trigger-rally/ Trigger Rally] - A fast-paced open source rally racing game. * [http://vamos.sourceforge.net/ Vamos Automotive Simulator] - A automotive simulation framework with an emphasis on thorough physical modeling and good C++ design. It includes a real-time, first-person, 3D driving application. * [http://speed-dreams.sourceforge.net/ Speed Dreams] - A fork of the TORCS, aiming to implement exciting new features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as constantly improving visual and physics realism. * [http://supertuxkart.sourceforge.net/ Super TuxCart] - A free 3D kart racing game * [http://code.google.com/p/vdrift-ogre/ Stunt Rally] - A racing game that focuses on closed rally tracks with possible stunt elements (jumps, loops, pipes). It uses VDrift for car simulation. * [http://www.racer.nl/ Racer] - A free car simulation project using professional car physics to achieve a realistic feeling and an excellent render engine for graphical realism. [[Category:External Resources]] [[Category:Expand]] [[Category:Reformat]] 361a2e2eeb31e81877a9bc54d61ec144bd1eb988 965 964 2010-12-16T15:54:08Z Timo 6 3 Merged 'Communities' and added heading descriptions. wikitext text/x-wiki The VDrift community is an always expanding world of open source game developers, gamers on all platforms, artists and designers, and car tuners. It is based totally on the internet. The following links might be useful for users and developers of VDrift. ==VDrift== VDrift has several web sites devoted to the project and development. They are: * [http://vdrift.net/ Home] - The main project web site, includes news and forums, and general project information. * [http://cars.vdrift.net/ Cars] - VDrift cars database. * [http://vdrift.net/Forum/ Forum] - Discuss new features and development, report bugs and get help with problems in the forums. * [http://sourceforge.net/projects/vdrift SourceForge] - VDrift downloads are hosted on SourceForge, as well as the data repository. * [http://svn.vdrift.net/ SVN Repository] - This includes a public browser for the main VDrift Subversion tree, as well as HTTP access to the tree itself. * [http://wiki.vdrift.net/ Wiki] - The VDrift Wiki is the home of all the project's documentation. * [http://code.google.com/p/vdrift/issues/list Issue Tracker] - Tracks the fixing of bugs and implementing of new features. * [http://vdrift.net/staticpages/index.php?page=irc-chat Chat] - IRC channel used both for developer discussion and user support. If you have a problem or question feel free to stop by and ask. ==Driving Simulation Information== These are some links to general driving simulation information and communities: * Wikipedia: [http://en.wikipedia.org/wiki/Sim_racing Sim racing], [http://en.wikipedia.org/wiki/Racing_video_game Racing video game] - General information about simulated racing games. * [http://www.miata.net/sport/Physics/ Physics of Racing] - A series of articles about the physics of racing cars. * [http://www.cescg.org/CESCG-2003/SDeak/index.html Dynamical Simulation in a Driving Simulator] - A paper that addresses some important aspects of building a graphical model and a dynamical model for a driving simulator. * [http://www.racesimcentral.com/ Race Sim Central] - Racing simulation news and forums. * [http://www.racedepartment.com/content/ RaceDepartment] - Racing simulation community. ==Open Source Driving Simulators and Racing Games== Some more driving simulators: * [http://torcs.org/ The Open Race Car Simulator (TORCS)] - A car racing simulation focusing on AI racing and research. It can also be used as a ordinary car racing game too. * [http://sourceforge.net/projects/trigger-rally/ Trigger Rally] - A fast-paced open source rally racing game. * [http://vamos.sourceforge.net/ Vamos Automotive Simulator] - A automotive simulation framework with an emphasis on thorough physical modeling and good C++ design. It includes a real-time, first-person, 3D driving application. * [http://speed-dreams.sourceforge.net/ Speed Dreams] - A fork of the TORCS, aiming to implement exciting new features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as constantly improving visual and physics realism. * [http://supertuxkart.sourceforge.net/ Super TuxCart] - A free 3D kart racing game * [http://code.google.com/p/vdrift-ogre/ Stunt Rally] - A racing game that focuses on closed rally tracks with possible stunt elements (jumps, loops, pipes). It uses VDrift for car simulation. [[Category:External Resources]] 84d8ca61e454cf2862fc68d6bbcc24075818e57b About the project 0 4 32 31 2010-12-12T14:17:16Z Timo 6 3 Merged homepage description and added a few features wikitext text/x-wiki ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v2. It is currently available for Linux, FreeBSD, Mac OS X and Windows. ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 40 tracks based on famous real-world tracks * Almost 40 cars based on real-world vehicles * Very realistic, simulation-grade driving physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake and reverse lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback * Race against up to 3 AI with variable difficultly * Engine and road sounds ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. [[Category:General Info]] [[Category:Update]] 733bd6dedfda2885209174f2e0acb6b4ff3cb091 34 33 2011-01-02T17:40:47Z Timo 6 3 Added goals sections as per forum topic: http://vdrift.net/Forum/viewtopic.php?p=11936#11936 wikitext text/x-wiki {{update}} ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v2. It is currently available for Linux, FreeBSD, Mac OS X and Windows. ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 40 tracks based on famous real-world tracks * Almost 40 cars based on real-world vehicles * Very realistic, simulation-grade driving physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake and reverse lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback * Race against up to 3 AI with variable difficultly * Engine and road sounds ==Goals== The goals of the VDrift project are: * to be a high-quality, open source racing simulation featuring enjoyable and challenging gameplay; * to take advantage of modern computing hardware to accurately simulate vehicle physics in rich and immersive racing environments; and * to provide a platform for creative experimentation to a community of developers and artists. ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. [[Category:General Info]] [[Category:Update]] 162c23a5e26d99db3abb0f87102553b6256a2f95 Old Method of Compiling on Linux 0 60 730 2010-12-12T14:31:32Z Timo 6 3 Spliting up Compiling wikitext text/x-wiki ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] 229338978f5315a91094a8e0e7829ee7c409a31c 731 730 2010-12-12T14:32:57Z Timo 6 3 [[Linux]] moved to [[Compiling on Linux]] wikitext text/x-wiki ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] 229338978f5315a91094a8e0e7829ee7c409a31c Old Method of Compiling on Windows 0 62 752 2010-12-12T14:34:27Z Timo 6 3 Spliting up Compiling wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 1768508728777af05c60fa62d5f48e6a3bc37776 753 752 2010-12-17T10:31:37Z NaN 4 /* MinGW */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] eaae9b1b4ec3768ffd12521da3e376606266606c 754 753 2011-02-24T23:56:04Z NaN 4 /* Source and Data */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====cURL==== Download the cURL distribution from this link: http://curl.haxx.se/download/libcurl-7.18.0-win32-msvc.zip Uncompress libcurl, move libcurl.dll to VDrift/tools/win/dll and include/curl to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 9ee0c090452bcfe8934289f159135519a2a65d89 755 754 2011-02-25T00:17:09Z NaN 4 /* cURL */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====cURL==== Download the cURL source(curl-7.21.4.zip) from this link: http://curl.haxx.se/download.html - Uncompress curl. - Import lib/vc6libcurl.dsp into codeblocks. - Set vc6libcurl as active project. - In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib - Build Win32 DLL Release - Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll - Copy include/curl to vdrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] be54ca44ebdfc68ef9e461e8c774fa4447b804b8 756 755 2011-02-25T00:17:57Z NaN 4 /* cURL */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====cURL==== Download the cURL source(curl-7.21.4.zip) from this link: http://curl.haxx.se/download.html * Uncompress curl. * Import lib/vc6libcurl.dsp into codeblocks. * Set vc6libcurl as active project. * In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib * Build Win32 DLL Release * Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll * Copy include/curl to vdrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] ec20cbfb071fd596bdede45d114918c27813bdc5 757 756 2011-02-25T00:18:25Z NaN 4 /* cURL */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====cURL==== * Download the cURL source(curl-7.21.4.zip) from this link: http://curl.haxx.se/download.html * Import lib/vc6libcurl.dsp into codeblocks. * Set vc6libcurl as active project. * In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib * Build Win32 DLL Release * Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll * Copy include/curl to vdrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] bf35ecdbabdc9190207203c35c780c5c1b1263eb 758 757 2011-02-25T00:22:38Z NaN 4 /* cURL */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====cURL==== * Download cURL source(curl-7.21.4.zip) from this link: http://curl.haxx.se/download.html * Import lib/vc6libcurl.dsp into codeblocks. * Set vc6libcurl as active project. * In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib * Build Win32 DLL Release * Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll * Copy include/curl to vdrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 11c8f8df37d7f6a22f6b0f3c077ee001cc2beb6f 759 758 2011-02-25T00:38:58Z NaN 4 /* cURL */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====cURL==== * Download cURL source(curl-7.21.4.zip) from this link: http://curl.haxx.se/download.html * Import lib/vc6libcurl.dsp into codeblocks. * In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib * Build Win32 DLL Release * Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll * Copy include/curl to vdrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] e12b2f451933a11633d0a45ea491ba0ae8f1cfcc Compiling VDrift 0 16 313 312 2010-12-12T14:38:18Z Timo 6 3 Added links to seperate OS pages. wikitext text/x-wiki Compiling VDrift is different depending on the operating system on which it is compiled. [[Compiling on Linux]] [[Compiling on Mac OS X]] [[Compiling on Windows]] ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 with the "10.4 Universal SDK" and the "X11 SDK" installed. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://downloads.sourceforge.net/mingw/MinGW-5.1.3.exe?modtime=1168811236&big_mirror=1 MinGW 5.1.3] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat =====Building with MSYS===== * [http://downloads.sourceforge.net/mingw/MSYS-1.0.10.exe?modtime=1079444447&big_mirror=1 Download MSYS 1.0.10] * Run the installer. * Choose the default install location. * When presented with a terminal asking if you want to continue with the post-install, type '''y''', then press enter. * When asked if MinGW is installed, enter '''C:/MinGW''', then press enter. * The MSYS post install script should find your MinGW installation now and configure itself. * [http://downloads.sourceforge.net/mingw/msysDTK-1.0.1.exe?modtime=1041430674&big_mirror=1 Download MSYS-DTK 1.01] * Run the installer and accept all the defaults. * To build VDrift you must use the MSYS terminal to run the build script. * Launch MSYS by clicking '''Start''' -> '''Programs''' -> '''MinGW''' -> '''MSYS''' -> '''msys'''. * Change directories to the spot where you checked VDrift out. If your username is '''Administrator''' and you put it on your Desktop in a directory named '''VDrift''', you would enter this command: cd /c/Documents\ and\ Settings/Administrator/Desktop/VDrift * Now, to build VDrift, run the command: sh tools/win/bin/build_vdrift.sh ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 2bf11c6107d4d30f24adef583baa4f378e4e4162 Old Method of Compiling on Mac OS X 0 61 740 2010-12-12T15:45:33Z Timo 6 3 Spliting up Compiling wikitext text/x-wiki ==Mac OS X== ===Prerequisites=== The VDrift Mac OS X project requires Xcode version 2.2 or later with the "10.4 Universal SDK" and the "X11 SDK" installed. To get Xcode go to http://developer.apple.com/technologies/xcode.html. You'll need to sign up for a free Apple Developer membership. ===Download=== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ===Build=== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] 3d811a8a77422758186e6014dfe073f1ec06b3df 741 740 2010-12-28T22:24:50Z Timo 6 3 Added error fixing section. wikitext text/x-wiki ==Prerequisites== The VDrift Mac OS X project requires Xcode version 2.2 or later with the "10.4 Universal SDK" and the "X11 SDK" installed. To get Xcode go to http://developer.apple.com/technologies/xcode.html. You'll need to sign up for a free Apple Developer membership. ==Download== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Build== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the XCode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from XCode that are in the project but not in the repository anymore. * Add new files to XCode that are in the repository, but have not yet been added to the project. You can see which files have added or removed in the output of 'svn update'. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] 6b6ad53c232d1fe5dbfe6e85fc9519636508625b 742 741 2010-12-28T22:27:06Z Timo 6 3 Added summary. wikitext text/x-wiki This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode version 2.2 or later with the "10.4 Universal SDK" and the "X11 SDK" installed. To get Xcode go to http://developer.apple.com/technologies/xcode.html. You'll need to sign up for a free Apple Developer membership. ==Download== Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Build== Finally open ''tools/osx/vdrift.xcodeproj'' and hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the XCode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from XCode that are in the project but not in the repository anymore. * Add new files to XCode that are in the repository, but have not yet been added to the project. You can see which files have added or removed in the output of 'svn update'. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] 09acb1e27d639c9103c1782312a43cd7310cc2bf 743 742 2011-03-11T19:21:41Z Timo 6 3 Update for Xcode 4 wikitext text/x-wiki This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode 2.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4 costs $4.99 on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store], or get it by registering with Apple on the [http://developer.apple.com/programs/ iOS or Mac Developer Programs] for $99 a year. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Build== Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the XCode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from XCode that are in the project but not in the repository anymore. * Add new files to XCode that are in the repository, but have not yet been added to the project. You can see which files have added or removed in the output of 'svn update'. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] d0190b3a186bf3aeed10a4d8bf72b570dd3d21f0 744 743 2011-03-11T19:55:14Z Timo 6 3 wikitext text/x-wiki This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode 2.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4 costs $4.99 on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store], or get it by registering with Apple on the [http://developer.apple.com/programs/ iOS or Mac Developer Programs] for $99 a year. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Build== Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. You can see which files have added or removed in the output of 'svn update'. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] 80d14d8dd918b921530bbbc793ed93a29032fa28 Coordinate systems 0 24 380 379 2010-12-12T20:24:21Z Timo 6 3 Current system first, bullets instead of code blocks. wikitext text/x-wiki ==Coordinate system== Currently, the .car files use the following coordinate system for all parameters: * car x = right & left, negative being left * car y = forward & back, negative being back * car z = up & down, negative being down This coordinate system was picked because it matches the blender coordinates. To use this coordinate system, specify "version = 2" in the .car file. ==Coordinate system version 1 (outdated)== Previous to code revision 2196, the .car files all used mixed coordinate systems. * blender coordinate system ** car x = right & left, negative being left ** car y = forward & back, negative being back ** car z = up & down, negative being down * .car file: mass positioning (same as blender) ** car x = right & left, negative being left ** car y = forward & back, negative being back ** car z = up & down, negative being down * .car file: wheel positioning (tested on Front Right wheel) ** wheel x = forward and back, negative being back ** wheel y = left and right, negative being right ** wheel z = up and down, negative being down * .car file: view positioning (same as wheel) ** view x = forward & back, negative being back ** view y = right & left, negative being right ** view z = up and down, negative being down [[Category:Cars]] [[Category:Tracks]] [[Category:Historical]] [[Category:Reformat]] 38baed5f7a147506986d5c200014ef7a875d7bb3 Sound/Audio Development 0 78 920 919 2010-12-13T18:05:31Z Timo 6 3 Reformat. wikitext text/x-wiki These are some preliminary recordings of a miata. Discussion is welcomed here and in the forum thread: [http://vdrift.net/Forum/viewtopic.php?t=816 Collecting Audio] ==Notes== Some notes on the sounds: **Inside - 2 microphones in a 180 degree stereo setup behind the driver headrest. **Behind - 2 Microphones in a 45 degrees stereo setup 7 feet behind the car. **Some filenames have odd case, I'll make all lowcase standard in the future. **I did very little to the raw audio other than a little compression to lessen the dynamic range. **Some of these are very quiet, such as the 1k inside. ==Miata sounds== The .wav files for each recording: ===Inside=== **[http://fangbaby.com/share/vdrift/01%20-%201k%20inside.wav 1k inside] **[http://fangbaby.com/share/vdrift/02%20-%202k%20inside.wav 2k inside] **[http://fangbaby.com/share/vdrift/03%20-%203k%20inside.wav 3k inside] **[http://fangbaby.com/share/vdrift/04%20-%204k%20inside.wav 4k inside] **[http://fangbaby.com/share/vdrift/05%20-%205k%20inside.wav 5k inside] **[http://fangbaby.com/share/vdrift/06%20-%206k%20inside.wav 6k inside] **[http://fangbaby.com/share/vdrift/07%20-%207k%20inside.wav 7k inside] **[http://fangbaby.com/share/vdrift/08%20-%20Revlimit%20Inside.wav RevLimit inside] **[http://fangbaby.com/share/vdrift/09%20-%20750to7k%20inside.wav 750to7k inside] ===Behind=== **[http://fangbaby.com/share/vdrift/10%20-%201k%20Behind.wav 1k behind] **[http://fangbaby.com/share/vdrift/11%20-%202k%20Behind.wav 2k behind] **[http://fangbaby.com/share/vdrift/12%20-%203k%20Behind.wav 3k behind] **[http://fangbaby.com/share/vdrift/13%20-%204k%20Behind.wav 4k behind] **[http://fangbaby.com/share/vdrift/14%20-%205k%20Behind.wav 5k behind] **[http://fangbaby.com/share/vdrift/15%20-%206k%20Behind.wav 6k behind] **[http://fangbaby.com/share/vdrift/16%20-%207k%20behind.wav 7k behind] **[http://fangbaby.com/share/vdrift/17%20-%20Revlimit%20behind.wav RevLimit behind] **[http://fangbaby.com/share/vdrift/18%20-%20Start%20Behind.wav Start behind] **[http://fangbaby.com/share/vdrift/19%20-%20Stop%20Behind.wav Stop behind] ===Moving Inside=== **[http://fangbaby.com/share/vdrift/20%20-%20Moving.wav Moving Inside] **[http://fangbaby.com/share/vdrift/21%20-%20Moving2.wav More Moving Inside] [[Category:Cars]] [[Category:Development]] 4a99aa9c4d6d322c4afe371b856375580e210710 Community 0 14 211 210 2010-12-16T15:58:54Z Timo 6 3 Merged to Useful Links - just left a link there here. wikitext text/x-wiki {{note|Please see [[Useful Links]] to find information about the VDrift Community.}} 6ed3f1e2bafd11a01855fe2924755b571a97dc73 212 211 2010-12-16T15:59:12Z Timo 6 3 wikitext text/x-wiki {{note|Please see [[Useful links]] to find information about the VDrift Community.}} e494d3d515763eef1d0eea8fb7c38f8f84bf9540 Authors and contributors 0 6 62 61 2010-12-16T20:30:04Z Timo 6 3 wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page, or post in the forums.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to fix bugs in the game, as well as writing new subsystems and maintaining old ones. Joe created everything in VDrift which is not attributed to someone else below. The physics engine in the game was originally [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. As time went on it underwent many modifications. Now, the physics system has been rewritten. ==Current Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=5379 NaN] has rewritten the physics code, added car color selection, implemented multi-language menus, and continues to fix bugs and add new features. * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, much of the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. Chris is currently working on a driver training system with evaluation of driving behavior and driver feedback. * [http://vdrift.net/users.php?mode=profile&uid=1435 Francis Whittle] has improved the car suspension by adding new types of suspension. * [http://vdrift.net/users.php?mode=profile&uid=5534 Antonio Caiazzo] is working on a new AI system based on neural networks. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Tracks==== * [http://vdrift.net/users.php?mode=profile&uid=412 alex25] has imported most of the tracks from various sources, and helped maintain them over time. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=1337 Ny Dedes] TC6, LE, and is working on a new car, the ATT. also modeled the driver, and coded the mesh generation for tires and brake rotors. * [http://vdrift.net/users.php?mode=profile&uid=3407 Timothy Porter] is working on preparing freely-licensed car models for import, and polishing the track Rouen. ===Ports=== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] maintains the VDrift port for Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] maintains the VDrift port for FreeBSD. ===Documentation=== * [http://vdrift.net/users.php?mode=profile&uid=2522 Timothy Furlong] has helped to update and expand wiki pages. ==Former Contributors== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * [http://vdrift.net/users.php?mode=profile&uid=755 rookie1] wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=5095 MirceaKitsune] contributed new skins for several cars, and several patches including adding reverse lights, sounds for gear, brake and handbrake, and a new car coloring implementation with adapted skins. * [http://vdrift.net/users.php?mode=profile&uid=710 cotharyus] improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helped with testing and debugging, worked on Debian GNU/Linux packaging, and improved the build system. * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] packaged VDrift for Slackware Linux and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=1356 Gonéri Le Bouder] worked on Debian GNU/Linux packaging and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] managed the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added the first version of internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. * [http://vdrift.net/users.php?mode=profile&uid=769 pwp71] helped maintain track data when new features became available. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 Tyler Fric] created the 360. [[Category:General Info]] a1bed08853898f46f8da63f1c1e3bce4bb31ad30 Profiling 0 72 860 2010-12-24T17:27:19Z Venzon 1 New page: VDrift uses the GNU profiler, gprof. To use it, recompile VDrift with "scons profiling=1", then run the VDrift executable and perform activities that you'd like to profile. After exiting, ... wikitext text/x-wiki VDrift uses the GNU profiler, gprof. To use it, recompile VDrift with "scons profiling=1", then run the VDrift executable and perform activities that you'd like to profile. After exiting, simply run gprof on the executable. 975d6deb667bb563a49d3cdb239a2bfe5a8f3a4c 861 860 2010-12-24T20:31:31Z Timo 6 3 Added to expand and development categories. wikitext text/x-wiki VDrift uses the GNU profiler, gprof. To use it, recompile VDrift with "scons profiling=1", then run the VDrift executable and perform activities that you'd like to profile. After exiting, simply run gprof on the executable. [[Category:Development]] [[Category:Expand]] 1de2ec8a28f04e3e2c9d0bd4a075f634a4f4096f IForce FF support 0 39 525 524 2010-12-28T17:00:33Z Timo 6 3 Remove _ from setting up force feedback link. wikitext text/x-wiki == Linux == This was tested with Guillemot Ferrari Force Feedback Wheel USB, however, it should work on any wheel that uses the iforce kernel module. Kernel should be compiled with force feedback support for iforce module (a recent Ubuntu distribution works out of the box, 10.10 was tested, earlier should work too). Follow instructions on [[Setting up force feedback]], the important steps being: compile VDrift from source with forcefeedback support (SVN r3012 (27th Dec 2010) or later), edit VDrift.config and set up write permissions for /dev/input/eventX with something similar to: '''sudo chmod 777 /dev/input/eventX''' Follow VDrift console output for any force feedback related message; when working properly it should say the force feedback has been initialized. In Ubuntu you can do '''sudo apt-get install joystick''' to install test applications fftest and ffcfstress. fftest should work fine (although the effects are somewhat poor), but ffcfstress erroneously reports that the device has no force feedback support. Still, FF should work well in VDrift. In Windows the driver for the discontinued Guillemot wheel is the same as for Thrustmaster Ferrari Force Feedback Racing Wheel, so there is a good chance that the same applies for this particular Thrustmaster wheel. 43b6b261bfa302205372750f695ca661874079ad Source code documentation 0 80 933 932 2010-12-28T20:21:09Z Timo 6 3 Spelling: folling --> following wikitext text/x-wiki Doxygen documentation is available for VDrift. Currently only the Subversion trunk is available. It is generated daily from the latest version of the [[Getting the development version|Development version]]. == Other versions == Doxygen output for the last release will be added soon. When new releases are made, documentation will be made available with the release. == Read Online == You can find [http://vdrift.net/doxygen/trunk/ Doxygen for VDrift trunk] at the following URL: http://vdrift.net/doxygen/trunk/ == Download == Downloadable PDF and Zip archives of the HTML version for offline browsing will be available soon. == Help improve documentation == If you are writing new code for VDrift, it would help to write comments using a format Doxygen can take advantage of. Here are a few handy links describing how to do that: * [http://www.stack.nl/~dimitri/doxygen/docblocks.html Doxygen Manual: Documenting Code] * [http://www.stack.nl/~dimitri/doxygen/commands.html Doxygen Manual: Command Reference] * [http://www.stack.nl/~dimitri/doxygen/manual.html Entire Doxygen Manual] [[Category:Development]] [[Category:Documenting]] [[Category:External Resources]] [[Category:Expand]] 5bc6208118f370bfdad9ead1960054672947d23b Getting VDrift 0 33 485 484 2011-01-10T21:53:12Z Timo 6 3 Added link to sourceforge project page. wikitext text/x-wiki VDrift releases are available on [http://sourceforge.net/projects/vdrift/ SourceForge]. It is recommended that users download the very latest release for their operating system. To find out the prerequisites for installing VDrift, see [[Hardware requirements]] and [[Software requirements]]. To learn how to install VDrift, see [[Installing]]. To obtain the development version of VDrift, see [[Getting the development version]]. ==Version Numbering== Each release of VDrift has a version number corresponding to the date of release, in the '''YYYY-MM-DD''' format. The latest release will be have the version number closest to the current date. ==Operating Systems== Currently, downloadable releases are usually provided for [[:Category:Operating Systems:Linux|Linux]], [[:Category:Operating Systems:Mac OS X|Mac OS X]], and [[:Category:Operating Systems:Windows|Windows]]. The installer package for a given operating system will be marked as such in the SourceForge download system. [[Category:Installation]] 28a3febbdc0563d4af477c5b6724f9b3349ed0f1 Old Method of Installing on Mac OS X 0 64 813 812 2011-01-10T22:00:30Z Timo 6 3 Added prerequisites section. wikitext text/x-wiki ==Prerequisites== * See [[Hardware requirements]] and [[Software requirements]]. * VDrift requires Mac OS X 10.4 "Tiger" or higher. ==Binary Install== * Download the latest VDrift release for Mac OS X from or [http://sourceforge.net/projects/vdrift/files/vdrift/ SourceForge] (a link to the latest version is always on the home page at [http://vdrift.net/ vdrift.net]). * If you are not using Safari as your browser or disabled the automatic opening of safe file types you have to double click the downloaded ''.dmg'' file (probably in your download folder). * Drag or copy all the files and folders from the mounted disk image named "VDrift" to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] 9fe03800802636cec4f0c5680b870d987cc2493a 814 813 2011-01-10T22:04:01Z Timo 6 3 /* Binary Install */ Made 2nd bullet more concise. wikitext text/x-wiki ==Prerequisites== * See [[Hardware requirements]] and [[Software requirements]]. * VDrift requires Mac OS X 10.4 "Tiger" or higher. ==Binary Install== * Download the latest VDrift release for Mac OS X from or [http://sourceforge.net/projects/vdrift/files/vdrift/ SourceForge] (a link to the latest version is always on the home page at [http://vdrift.net/ vdrift.net]). * If it doesn't automatically open, double click the ''vdrift-xxx-xx-xx.dmg'' file (probably in your download folder). * Drag or copy all the files and folders from the resulting mounted disk image named "VDrift" to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] 1dc655b3a14a38ba54a2a1fa20f8e3c39d59be68 815 814 2011-01-10T22:05:17Z Timo 6 3 /* Binary Install */ Fix first bullet. wikitext text/x-wiki ==Prerequisites== * See [[Hardware requirements]] and [[Software requirements]]. * VDrift requires Mac OS X 10.4 "Tiger" or higher. ==Binary Install== * Download the latest VDrift release for Mac OS X from the link on the homepage at [http://vdrift.net/ vdrift.net] or [http://sourceforge.net/projects/vdrift/files/vdrift/ SourceForge]. * If it doesn't automatically open, double click the ''vdrift-xxx-xx-xx.dmg'' file (probably in your download folder). * Drag or copy all the files and folders from the resulting mounted disk image named "VDrift" to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] 2557230c610693f0143161b7e8bc911038fc75fb Car parameters(old) 0 10 128 2011-04-18T09:14:05Z NaN 4 [[Car parameters(old)]] moved to [[Car parameters for vdrift-2009-06-15 and older]] wikitext text/x-wiki #REDIRECT [[Car parameters for vdrift-2009-06-15 and older]] e7b5d5a7a49f0d1828b5a43297c3b109d0133a1b Car parameters for vdrift-2009-06-15 and older 0 11 169 168 2011-04-18T09:14:05Z NaN 4 [[Car parameters(old)]] moved to [[Car parameters for vdrift-2009-06-15 and older]] wikitext text/x-wiki Car parameters description for vdrift-2009-06-15 and older. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. [[Category:Historical]] a1423c2a3aed3c0f2872a2c8af5dd55edf766a2a 170 169 2011-04-18T09:14:33Z NaN 4 wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. [[Category:Historical]] d915b9d3ffeec5b1be2162a04815433be9a1999c Car parameters for vdrift-2010-06-30 0 12 186 185 2011-04-18T09:15:32Z NaN 4 wikitext text/x-wiki {{update}} ==Old car parameters==: [[Car_parameters_for_vdrift-2009-06-15_and_older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 6319ab1f494aa82b00165bb1b965caa731e941ad 187 186 2011-04-18T09:15:44Z NaN 4 wikitext text/x-wiki {{update}} ==Old car parameters== [[Car_parameters_for_vdrift-2009-06-15_and_older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] b127431bc64f5e5af405d2a63e6debe5a7949acb 188 187 2011-04-18T09:16:14Z NaN 4 wikitext text/x-wiki {{update}} Old car parameters: [[Car_parameters_for_vdrift-2009-06-15_and_older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 854730d58c7ffb74baf2c50c721ae042b1394ef1 189 188 2011-04-18T09:19:05Z NaN 4 [[Car parameters]] moved to [[Car parameters for vdrift-2010-06-30]] wikitext text/x-wiki {{update}} Old car parameters: [[Car_parameters_for_vdrift-2009-06-15_and_older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 854730d58c7ffb74baf2c50c721ae042b1394ef1 190 189 2011-04-18T09:25:56Z NaN 4 wikitext text/x-wiki Old car parameters: [[Car_parameters_for_vdrift-2009-06-15_and_older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] c1b05d08b5a0fb174b8c6bab6b58f2c8799c1ede 191 190 2011-04-18T09:27:28Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 1e928797480de45ff82d41283e61e687a49487eb Car parameters 0 9 73 2011-04-18T09:19:05Z NaN 4 [[Car parameters]] moved to [[Car parameters for vdrift-2010-06-30]] wikitext text/x-wiki #REDIRECT [[Car parameters for vdrift-2010-06-30]] 866388a814ae06bc463d93992256f50b55b641fd 74 73 2011-04-18T09:20:47Z NaN 4 wikitext text/x-wiki Old car parameters: [[Car parameters for vdrift-2010-06-30]] [[Car_parameters_for_vdrift-2009-06-15_and_older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 2d0f11e0ba03bd56072f2db5f3e2ca13c708f7ce 75 74 2011-04-18T09:22:17Z NaN 4 wikitext text/x-wiki Old car parameters: - [[Car parameters for vdrift-2010-06-30]] - [[Car_parameters_for_vdrift-2009-06-15_and_older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 9fd229cfc20e3865db5a12026803d418135f6489 76 75 2011-04-18T09:26:35Z NaN 4 wikitext text/x-wiki Old car parameters: * [[Car parameters for vdrift-2010-06-30]] * [[Car_parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 22efb7984c01fe814e5c85d15947aa4617878ef1 77 76 2011-04-18T09:26:52Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 26bfa0e17727aa4959b9078363755e1311a10f65 78 77 2011-04-18T09:31:53Z NaN 4 /* Coordinate system */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the following coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up This is known as a [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] e1461c5511e76cd68284334c3df82780a4413e5f Car parameters 0 9 79 78 2011-04-18T09:32:41Z NaN 4 /* Coordinate system */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] a82fa24fe93a6827f949d064ab62947c36eb2612 80 79 2011-04-18T09:34:01Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] f1272a9c0e83832a238f76b4bca3b3460797bfe0 81 80 2011-04-18T09:34:58Z NaN 4 /* Engine */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] a9c734ebb4307d310eadbed342578855b20f4b77 82 81 2011-04-18T09:42:40Z NaN 4 /* Differential */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. For FWD cars [differential.front] has to be defined. AWD cars require [differential.front], [differential.rear] and [differential.center] to be defined. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 0ffac8dbc24497f4f5bbc5156dfdbadf5768533e 83 82 2011-04-18T09:43:12Z NaN 4 /* Differential */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> '''For FWD cars [differential.front] has to be defined. AWD cars require [differential.front], [differential.rear] and [differential.center].''' The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 710e82ccc8dd279aead9dbd598659aa269d88767 84 83 2011-04-18T09:44:19Z NaN 4 /* Differential */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> '''For FWD cars [differential.front] has to be defined. AWD cars require [differential.front], [differential.rear] and [differential.center].'''<br /> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] f27be83230dd91ae37cc4518eae38095a642fa59 85 84 2011-04-18T09:44:59Z NaN 4 /* Differential */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For FWD cars [differential.front] has to be defined. AWD cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 4410e3c2dc9d1831d23f9a0ddf2c5cedfaadffb5 86 85 2011-04-18T09:46:45Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For FWD cars [differential.front] has to be defined. AWD cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 1b13d6e1841979641402546796370a3dad9bd777 87 86 2011-04-18T09:47:27Z NaN 4 /* Differential */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] c1c54e7b24f186ec5faefca2f3317a6a4f4ed48d 88 87 2011-04-18T09:51:39Z NaN 4 /* Aerodevice */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] bebe4ffa9c706d6ff1009cb76e0e7184320c2e23 89 88 2011-04-18T09:55:42Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(fl, fr, rl, rr). For a FWD car the wheels fl and fr are powered, for RWD the wheels rl, rr. The orientation determines the wheel facing direction. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 3a28db50c0d57cbe816a5f5c34baf86ec6dacaaa 90 89 2011-04-18T09:56:24Z NaN 4 /* Wheel */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl, rr. The orientation determines the wheel facing direction. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 7318c9bdac5378ac6d58d7b8b90ab03737d6c1db 91 90 2011-04-18T09:57:02Z NaN 4 /* Wheel */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl, rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] a791e3afe86ac25253b5290a5b1e9acee27c98e0 92 91 2011-04-18T09:57:30Z NaN 4 /* Wheel */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 8a834a71eb3cbe97616fdd001822004a89893e54 93 92 2011-04-18T09:58:14Z NaN 4 /* Wheel */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 2f4c37120a46e88e8c5fd42ed823f0ae3a6ea403 94 93 2011-04-18T10:05:27Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Model Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = color = 0.8, 0.1, 0.1 scale = -1, 1, 1 draw = transparent </pre> ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 08d15001012a5efa548a9f39423d572ddfd722db 95 94 2011-04-18T10:16:57Z NaN 4 /* Model Parameters */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 25ef5e7b59f0e42c1a8fdb33a4f583fb29b48685 96 95 2011-04-18T10:17:19Z NaN 4 /* Common Parameters */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] c6a99f11b3d4436efd70528580fb7379d8f63a99 97 96 2011-04-18T10:20:15Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''.<br/> Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive.<br/> Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] d551fa6489dcb545385599550fff2a6ac9e0141d 98 97 2011-04-18T10:22:17Z NaN 4 /* Coilover */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''.<br/> Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive.<br/> Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 8c48c6e0caca4f0ae0f45c1b97d710d9e381a4f3 99 98 2011-04-18T10:33:18Z NaN 4 /* Coilover */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''.<br/> Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive.<br/> Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] cff4ea92ba3d368c354e2275d47e975fc880e517 100 99 2011-04-18T10:33:45Z NaN 4 /* Wheel */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 564f6fcbae5892c0a16e22bbc12d57bfc593b038 101 100 2011-04-18T10:34:21Z NaN 4 /* Tire */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 8c7035c0433da05a80d291c60fadeae018f76730 102 101 2011-04-18T10:37:08Z NaN 4 /* Tire */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Each wheel has a tire section. Tire size determines tire dimensions and optionally weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 49ade0d9810f515e0e30ef93bf9a2d5ad4b8b232 103 102 2011-04-18T10:39:30Z NaN 4 /* Common Parameters */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Each wheel has a tire section. Tire size determines tire dimensions and optionally weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] c7da36c7a898a732280fb380d4eda77b26b6ad3c 104 103 2011-04-18T10:40:19Z NaN 4 /* Tire */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Each wheel has a tire section. Tire size determines tire dimensions and optionally weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] e25d3ecc9b14fbdf7f9a4f0b27adb203e214a7a3 105 104 2011-04-18T10:48:40Z NaN 4 /* Tire */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Each wheel has a tire section. Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] abd0b027af83c4e3bcfcf84543dc5e36ac1fe555 106 105 2011-04-18T10:49:29Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 58cf64772297f269bd9e02f2aa61c0de6fd0a244 107 106 2011-04-18T10:56:05Z NaN 4 /* Brake */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake is the handbrake factor for the brake. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 0bba2fa6600645041792c151ee8332969e7f2189 108 107 2011-04-18T11:17:16Z NaN 4 /* Brake */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215,45,17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 2b0f24cab4409b03767f349e9ca61b09fe0dd214 109 108 2011-04-18T11:17:55Z NaN 4 /* Tire */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 9a059b6d19078ad1d52f52062d74fcdc7a106c60 110 109 2011-04-18T11:25:59Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge arm is attached at chassis to car body and at wheel to wheel hub. Alternatively a macpherson-strut setup can be used. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] f82bbc2a08efde88abd3ede95e3393293f1f9542 111 110 2011-04-18T11:26:46Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge arm is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] c0483ad5e9054617e0e16aaeb11bcd80b9384e2f 112 111 2011-04-18T11:28:09Z NaN 4 /* Suspension */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 8fc61f08a96f849ebfdf04f616c02fbb9baea736 113 112 2011-04-18T11:33:07Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 80ec902a6ceef4fd9993db185e19ebde8dffcc02 114 113 2011-04-18T11:44:22Z NaN 4 wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Lights are models with draw property set to emissive. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of components with arbitrary names(excluding the reserved ones, listed above). [[Category:Cars]] [[Category:Files]] [[Category:Update]] 54ae5d4d038103e6fabfe8653ca5ee5b59dfa887 115 114 2011-04-18T11:44:46Z NaN 4 /* Particle */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Lights are models with draw property set to emissive. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of components with arbitrary names(excluding the reserved ones, listed above). [[Category:Cars]] [[Category:Files]] [[Category:Update]] 4cd2126992733a77bccf6d7e3f6ff5ee751a6c6e 116 115 2011-04-18T11:45:14Z NaN 4 /* Car shape */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Lights are models with draw property set to emissive. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones, listed above). [[Category:Cars]] [[Category:Files]] [[Category:Update]] 8be4b172da8946d8f567469330685472b486d999 117 116 2011-04-18T11:46:34Z NaN 4 /* Common Parameters */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Lights are models with draw property set to emissive. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones, listed above). [[Category:Cars]] [[Category:Files]] [[Category:Update]] 614ec2a194e0bee08f2060f762edbe59615153f7 118 117 2011-04-18T11:48:07Z NaN 4 /* Car shape */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Lights are models with draw property set to emissive. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones, listed above). Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] c5bf29391974b8e9075d16cb7a36b047aaadedaa 119 118 2011-04-18T11:49:12Z NaN 4 /* Lights */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Lights are models with draw property set to emissive. light-brake is set emissive during braking, light-reverse if reverse gear is selecte.d ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones, listed above). Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 1938c179b912d910e6187deb4f006f4a1d2f537e 120 119 2011-04-18T11:50:33Z NaN 4 /* Lights */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel model has to reside in the car folder or '''carparts/wheel'''. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones, listed above). Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 6554f975f91fc42087aba49cc9dbd4a764a71bef 121 120 2011-04-18T11:53:06Z NaN 4 /* Wheel */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Lights== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones, listed above). Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] ea7802c1527534140d8cb5fc837208b1e6e594b0 122 121 2011-04-18T11:53:41Z NaN 4 /* Lights */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones, listed above). Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] b134cdd4c427955046efa8fccfd283b6aafabfbf 123 122 2011-04-18T11:56:45Z NaN 4 /* Car shape */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names(excluding the reserved ones: engine, clutch, ...). Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 018d3398998596df18d525821e7bcac6059e1d12 124 123 2011-04-18T11:57:06Z NaN 4 /* Car shape */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is an optional parameter used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 175409dffbabbaa9e1f89a0358adfe5792b2eccf 125 124 2011-04-18T13:53:14Z NaN 4 /* Common Parameters */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 41123e4098847c9d5d7a549e1f0f3e98d00eff67 Creating tracks 0 26 438 437 2011-04-22T03:14:01Z Venzon 1 wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial: http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt. At least one .joe file should get created for the curve track. Also verify that list.txt is mentioning all the .joe files. An empty list.txt will not load anything in the editor. * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Create a TRACKEDITOR_TP/track.txt file with at least a line "cull faces = on". track.txt is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within vdrift game. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in track.txt if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] [[Category:Review]] 44b7d1fb00807e8f18edc66e2678b40ceecdd2d2 439 438 2011-04-22T03:15:38Z Venzon 1 /* Video Tutorial */ wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt. At least one .joe file should get created for the curve track. Also verify that list.txt is mentioning all the .joe files. An empty list.txt will not load anything in the editor. * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Create a TRACKEDITOR_TP/track.txt file with at least a line "cull faces = on". track.txt is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within vdrift game. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in track.txt if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] [[Category:Review]] 14d7f115c88476f416f011324dfc1093d12d9468 440 439 2011-04-26T19:57:32Z Timo 6 3 /* Directions for creating tracks */ Remove extra blank line. wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: http://svn.vdrift.net/repos/vdrift-art/trunk/tools/ Get the "export-all-joe-0.3.py" script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: svn co http://svn.vdrift.net/repos/vdrift-trackeditor/trunk vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt. At least one .joe file should get created for the curve track. Also verify that list.txt is mentioning all the .joe files. An empty list.txt will not load anything in the editor. * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Create a TRACKEDITOR_TP/track.txt file with at least a line "cull faces = on". track.txt is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within vdrift game. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in track.txt if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] [[Category:Review]] 31c3ee3fa2ebf82a35f7e38b317e5a784f7b6aae Working with the development version 0 90 1089 1088 2011-06-01T20:02:03Z Timo 6 3 Use links instead of 'at the top of the page'. wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== This is the same as working with Linux/UNIX as above however Mac OS X does not ship with a SVN client, prior to version 10.5. If you are running 10.4 you will need to obtain an SVN client: If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: [http://pdb.finkproject.org/pdb/package.php/svn http://pdb.finkproject.org/pdb/package.php/svn]. If you want to download a binary version of the SVN client go here: [http://metissian.com/projects/macosx/subversion/ http://metissian.com/projects/macosx/subversion/]. If you are running on a Macintosh with an Intel processor make sure that you download the universal binary version of the SVN client. PowerPC exclusive binaries will not execute on an Intel based Macintosh. Once you have a working SVN client see the [[Getting_the_development_version#Linux/Unix|Linux/Unix]] instructions. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN website for more information on how to check out a repository. ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 47746f2ffd2476b6b42128626de6d6fd0eed4ff5 1090 1089 2011-06-01T20:52:13Z Timo 6 3 Clean up Mac section. wikitext text/x-wiki VDrift's code is kept in a Subversion repository. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== There is a VDrift SVN web site at http://svn.vdrift.net/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a svn ([http://subversion.tigris.org/ Subversion]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: svn checkout http://svn.vdrift.net/repos/vdrift/trunk vdrift It will download the current development version in the subfolder vdrift. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://tortoisesvn.net/ TortoiseSVN]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click SVN checkout. In the next screen you need to fill in the URL of the repository which is http://svn.vdrift.net/repos/vdrift/trunk. Simply click OK, and the development version will be downloaded. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== This is the same as working with [[Getting_the_development_version#Linux/Unix|Linux/Unix]] however if you are running Mac OS X 10.4 or older you will need to obtain an SVN client: * If you are a [http://fink.sourceforge.net/ Fink user] information about the latest Fink packages can be found here: http://pdb.finkproject.org/pdb/package.php/svn * If you want to download a binary version of the SVN client go here: http://metissian.com/projects/macosx/subversion/ Once you have a working SVN client see the [[Getting_the_development_version#Linux/Unix|Linux/Unix]] instructions. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN website for more information on how to check out a repository. ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line SVN, use the command svn update to check for updates and apply them. ===Checking in changes=== If you have been authorized as a VDrift developer and given a login for the repository, you may check in the changes to the repository. Subversion collects information on all the changes you make, so all you have to do is issue the command. svn commit Please remember to always add a commit message. This should be a summary of the changes you made. It helps let the other developers know what you've done, and also helps when writing change logs at release time. ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: svn add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>svn del ''filename''</code>. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 350d25e3de3927b58d6c9c6975e314a6b668bda3 1091 1090 2011-07-03T18:58:50Z Venzon 1 wikitext text/x-wiki VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== VDrift's source on the GitHub web site is at https://github.com/VDrift/vdrift/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a git ([http://git-scm.com/ Git]) client. If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: git clone git://github.com/VDrift/vdrift.git vdrift It will download the current development version in the subfolder vdrift. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://code.google.com/p/msysgit/ MSysGit]. After installing it, open Windows explorer and go to the directory where you want to download the VDrift development version. Right-click and click Git GUI Here. Select Open Existing Repository. In the next screen you need to fill in the URL of the repository which is git://github.com/VDrift/vdrift.git. Simply click OK, and the development version will be downloaded. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== This is the same as working with [[Getting_the_development_version#Linux/Unix|Linux/Unix]] however you will need to obtain a git client. Once you have a working SVN client see the [[Getting_the_development_version#Linux/Unix|Linux/Unix]] instructions. ==Checking out the data== The data set is currently only available from the SourceForge SVN. Get it from https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data to the vdrift/data from svn.vdrift.net. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called /home/user/code, you would do this: cd /home/user/code svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data If you are using the Tortoise SVN client, see the documentation on the Tortoise SVN [http://tortoisesvn.tigris.org/ website] for more information on how to check out a repository. ==Working with the repository== ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line git, use the command git pull to check for updates and apply them. ===Checking in changes=== You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/ ===Adding and removing files=== Every file you introduce to the checkout on your computer is not automatically added to the repository. First you must add it: git add ''filename'' Where ''filename'' is the file you wish to add. Similarly you may remove files that are no longer needed with <code>git rm ''filename''</code>. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 992c16f39863b0d6ade72e09fd3409c180f4f4b4 1092 1091 2011-07-03T20:45:02Z Timo 6 3 Added a few more git commands. wikitext text/x-wiki VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== VDrift's source on the GitHub web site is at https://github.com/VDrift/vdrift/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a git client (eg. [http://git-scm.com/ Git]). If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: git clone git://github.com/VDrift/vdrift.git vdrift It will download the current development version in the subfolder vdrift. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://code.google.com/p/msysgit/ MSysGit]. After installing it, open Windows Explorer and go to the directory to which you want to download the VDrift development version. Right-click and click Git GUI Here. Select Open Existing Repository. In the next screen you need to fill in the URL of the repository which is git://github.com/VDrift/vdrift.git. Simply click OK, and the development version will be downloaded. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== This is the same as working with [[Getting_the_development_version#Linux/Unix|Linux/Unix]] however you will need to obtain a git client (eg. [http://mac.github.com/ GitHub for Mac]). Once you have a working SVN client see the [[Getting_the_development_version#Linux/Unix|Linux/Unix]] instructions. ==Checking out the data== The data set is currently only available from the SourceForge SVN ([https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data]). It needs to be checked out in a ''/data'' directory in the main vdrift directory. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called ''/home/user/vdrift'', you would do this: cd /home/user/vdrift svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data ==Working with the repository== See this documentation for more info: http://help.github.com/ ===Making your own changes=== If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repo on GitHub (https://github.com/VDrift/vdrift/). Just click the button near the top right of the page. You will need a free GitHub account. Then clone your new repo onto your computer: git clone git@github.com:''username''/vdrift.git And link this to the original VDrift repo: git remote add upstream git://github.com/octocat/Spoon-Knife.git git fetch upstream ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line git, use the command git pull to check for updates and apply them. If you have made some changes, use the following to prevent these being lost: git fetch upstream git merge upstream/master ===Uploading changes=== To upload any changes you've made, first add the files to the commit: git add ''filename'' Then do the commit: git commit -m 'Commit message' And finally send this to GitHub: git push origin master ===Checking in changes=== You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/ Thank you for helping make VDrift better for everyone! [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 8b5e8afe437096cc4e093a8d0aae7d9b7b02b3b7 1093 1092 2011-07-03T20:46:30Z Timo 6 3 wikitext text/x-wiki VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== VDrift's source on the GitHub web site is at https://github.com/VDrift/vdrift/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an entire copy of the development tree. ===Linux/Unix=== Install a git client (eg. [http://git-scm.com/ Git]). If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: git clone git://github.com/VDrift/vdrift.git vdrift It will download the current development version in the subfolder vdrift. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://code.google.com/p/msysgit/ MSysGit]. After installing it, open Windows Explorer and go to the directory to which you want to download the VDrift development version. Right-click and click Git GUI Here. Select Open Existing Repository. In the next screen you need to fill in the URL of the repository which is git://github.com/VDrift/vdrift.git. Simply click OK, and the development version will be downloaded. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== This is the same as working with [[Getting_the_development_version#Linux/Unix|Linux/Unix]] however you will need to obtain a git client (eg. [http://mac.github.com/ GitHub for Mac]). Once you have a working SVN client see the [[Getting_the_development_version#Linux/Unix|Linux/Unix]] instructions. ==Checking out the data== The data set is currently only available from the SourceForge SVN (https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data). It needs to be checked out in a ''/data'' directory in the main vdrift directory. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called ''/home/user/vdrift'', you would do this: cd /home/user/vdrift svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data ==Working with the repository== See this documentation for more info: http://help.github.com/ ===Making your own changes=== If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repo on GitHub (https://github.com/VDrift/vdrift/). Just click the button near the top right of the page. You will need a free GitHub account. Then clone your new repo onto your computer: git clone git@github.com:''username''/vdrift.git And link this to the original VDrift repo: git remote add upstream git://github.com/octocat/Spoon-Knife.git git fetch upstream ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line git, use the command git pull to check for updates and apply them. If you have made some changes, use the following to prevent these being lost: git fetch upstream git merge upstream/master ===Uploading changes=== To upload any changes you've made, first add the files to the commit: git add ''filename'' Then do the commit: git commit -m 'Commit message' And finally send this to GitHub: git push origin master ===Checking in changes=== You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/ Thank you for helping make VDrift better for everyone! [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] b9503a0b1d8f6a84eccfec54ea10e89743cd2cfa Drifting techniques 0 30 459 458 2011-06-01T20:23:52Z Timo 6 3 Reformated and add wikipedia definition. -~~~~ wikitext text/x-wiki Drifting can be a very tedious and difficult feat to achieve. Some consider it an art, while others consider it recklessness. This is just a game, so pick up your paintbrush! ==About drifting== "Drifting refers to a driving technique and to a motorsport where the driver intentionally over steers, causing loss of traction in the rear wheels through turns, while maintaining vehicle control and a high exit speed. A car is drifting when the rear slip angle is greater than the front slip angle prior to the corner apex, and the front wheels are pointing in the opposite direction to the turn (e.g. car is turning left, wheels are pointed right or vice versa), and the driver is controlling these factors." (from [http://en.wikipedia.org/wiki/Drifting_%28motorsport%29 Wikipedia]) Drifting is caused by a lack of traction to the rear tires. The spinning of the tires causes the vehicle's rear end to "swing" out causing oversteer. Different cars will behave differently due to differences in torque, tire tread, weight placement, and suspension recoil. The spinning of the tires also "pushes" the back end of the car forward, so once in oversteer, it will need to be controlled. ==Initiating a drift=== There are a number of ways to get yourself into a drift. As said before, weight placement and suspension recoil can affect your traction on the rear tires. Here are some techniques: ===Handbrake=== Probably the easiest thing to do, but, however, most cars in the game do not have strong enough braking to do this. Just activate the handbrake and it will cause your car to lose traction. ===Steer + gas=== Ride your gas at a moderate RPM and steer into the corner. Once your front end starts turning, give it some more gas and you will get into an oversteer. ===Suspension recoil=== Use your suspension to "jump" the car into a drift. Steer away from the corner quickly and steer back in. This will cause a bouncing effect from left to right (or vice versa). Apply the "steer + gas" technique to get into oversteer if not achieved already. ===The Dip=== "Dip" your back tires in the dirt or grass or whatever off the track. This will cause your back end to swing a bit. ==Controlling The Drift== This is simple to do, but hard to perfect. Essentially, you will only need to steer to get your wheels pointed the direction you want to go. You will also need to control your throttle. The slower your tires spin, the more traction you will have. The opposite happens with faster spinning tires. Control your throttle and be careful not to give it too much juice or you will most likely spin out. Spinning out usually happens when the car is oversteered too much. The tires keep spinning and your car continues to rotate into the turn, but the front end will have too much traction and cause the car to rotate more. ==Cars To Try== {{update}} Some cars are easier than others to drift in the game. Excessive oversteer can be a problem for beginners. Lots of torque and traction make initiation and recovery easy. *Z06 *GT *G4 [[Category:Playing]] [[Category:Reviewt]] 18c15fc9a52071f7950dfb1334de3ce2f8c89f12 460 459 2011-06-01T20:30:09Z Timo 6 3 Remove exessive captials. wikitext text/x-wiki Drifting can be a very tedious and difficult feat to achieve. Some consider it an art, while others consider it recklessness. This is just a game, so pick up your paintbrush! ==About drifting== "Drifting refers to a driving technique and to a motorsport where the driver intentionally over steers, causing loss of traction in the rear wheels through turns, while maintaining vehicle control and a high exit speed. A car is drifting when the rear slip angle is greater than the front slip angle prior to the corner apex, and the front wheels are pointing in the opposite direction to the turn (e.g. car is turning left, wheels are pointed right or vice versa), and the driver is controlling these factors." (from [http://en.wikipedia.org/wiki/Drifting_%28motorsport%29 Wikipedia]) Drifting is caused by a lack of traction to the rear tires. The spinning of the tires causes the vehicle's rear end to "swing" out causing oversteer. Different cars will behave differently due to differences in torque, tire tread, weight placement, and suspension recoil. The spinning of the tires also "pushes" the back end of the car forward, so once in oversteer, it will need to be controlled. ==Initiating a drift=== There are a number of ways to get yourself into a drift. As said before, weight placement and suspension recoil can affect your traction on the rear tires. Here are some techniques: ===Handbrake=== Probably the easiest thing to do, but, however, most cars in the game do not have strong enough braking to do this. Just activate the handbrake and it will cause your car to lose traction. ===Steer + gas=== Ride your gas at a moderate RPM and steer into the corner. Once your front end starts turning, give it some more gas and you will get into an oversteer. ===Suspension recoil=== Use your suspension to "jump" the car into a drift. Steer away from the corner quickly and steer back in. This will cause a bouncing effect from left to right (or vice versa). Apply the "steer + gas" technique to get into oversteer if not achieved already. ===The dip=== "Dip" your back tires in the dirt or grass or whatever off the track. This will cause your back end to swing a bit. ==Controlling the drift== This is simple to do, but hard to perfect. Essentially, you will only need to steer to get your wheels pointed the direction you want to go. You will also need to control your throttle. The slower your tires spin, the more traction you will have. The opposite happens with faster spinning tires. Control your throttle and be careful not to give it too much juice or you will most likely spin out. Spinning out usually happens when the car is oversteered too much. The tires keep spinning and your car continues to rotate into the turn, but the front end will have too much traction and cause the car to rotate more. ==Cars== {{update}} Some cars are easier than others to drift in the game. Excessive oversteer can be a problem for beginners. Lots of torque and traction make initiation and recovery easy. *Z06 *GT *G4 [[Category:Playing]] [[Category:Review]] aceca1a0b16c1488d7edc43e611f9e789dd82853 461 460 2011-06-01T20:47:00Z Timo 6 3 wikitext text/x-wiki Drifting can be a very tedious and difficult feat to achieve. Some consider it an art, while others consider it recklessness. This is just a game, so pick up your paintbrush! ==About drifting== "Drifting refers to a driving technique and to a motorsport where the driver intentionally over steers, causing loss of traction in the rear wheels through turns, while maintaining vehicle control and a high exit speed. A car is drifting when the rear slip angle is greater than the front slip angle prior to the corner apex, and the front wheels are pointing in the opposite direction to the turn (e.g. car is turning left, wheels are pointed right or vice versa), and the driver is controlling these factors." (from [http://en.wikipedia.org/wiki/Drifting_%28motorsport%29 Wikipedia]) Drifting is caused by a lack of traction to the rear tires. The spinning of the tires causes the vehicle's rear end to "swing" out causing oversteer. Different cars will behave differently due to differences in torque, tire tread, weight placement, and suspension recoil. The spinning of the tires also "pushes" the back end of the car forward, so once in oversteer, it will need to be controlled. ==Initiating a drift== There are a number of ways to get yourself into a drift. As said before, weight placement and suspension recoil can affect your traction on the rear tires. Here are some techniques: ===Handbrake=== Probably the easiest thing to do, but, however, most cars in the game do not have strong enough braking to do this. Just activate the handbrake and it will cause your car to lose traction. ===Steer + gas=== Ride your gas at a moderate RPM and steer into the corner. Once your front end starts turning, give it some more gas and you will get into an oversteer. ===Suspension recoil=== Use your suspension to "jump" the car into a drift. Steer away from the corner quickly and steer back in. This will cause a bouncing effect from left to right (or vice versa). Apply the "steer + gas" technique to get into oversteer if not achieved already. ===The dip=== "Dip" your back tires in the dirt or grass or whatever off the track. This will cause your back end to swing a bit. ==Controlling the drift== This is simple to do, but hard to perfect. Essentially, you will only need to steer to get your wheels pointed the direction you want to go. You will also need to control your throttle. The slower your tires spin, the more traction you will have. The opposite happens with faster spinning tires. Control your throttle and be careful not to give it too much juice or you will most likely spin out. Spinning out usually happens when the car is oversteered too much. The tires keep spinning and your car continues to rotate into the turn, but the front end will have too much traction and cause the car to rotate more. ==Cars== {{update}} Some cars are easier than others to drift in the game. Excessive oversteer can be a problem for beginners. Lots of torque and traction make initiation and recovery easy. *Z06 *GT *G4 [[Category:Playing]] [[Category:Review]] b60cda262b461a9820f159a434a9b44b924a468a Drift scoring 0 29 455 454 2011-06-01T20:59:04Z Timo 6 3 Reformat wikitext text/x-wiki To find out more about what drifting is and how to do it read [[Drifting Techniques]]. ==Overview== The player's drift score is displayed on the left side of the screen, underneath the lap timer box. ==Start of scoring== The game starts drift scoring when a car satisfies the following conditions, * At least '''2''' of the wheels are on track, and * Car speed is above '''10 m/s''', and * The drift angle (angle between car's orientation and its velocity direction) is more than '''0.2 radian''' (about 11.5 degrees), and less than '''PI/2''' (i.e. spin out). ==End of scoring== The drift scoring ends when either one the following occurs, * Less than '''2''' wheels are on track, or * Car speed is less than '''10 m/s''', or * The drift angle is less than '''0.1 radian''' (about 5.7 degrees) ==Scoring rules== At the beginning of a drift, the game starts accumulating the score for this drift. At the end of a drift, the accumulated score is added to the total score. The accumulated score consists of base score and bonus score; * '''Base score''' - This is simply the length the car has travelled in this drift (in meters). A longer drift will earn higher base score. * '''Bonus score''' - This contains 3 components: ** '''drift length bonus''' - same value as the base score, effectively giving double bonus to longer drifts. ** '''maximum drift speed bonus''' - the value is the maximum drift speed (in m/s) / 2 e.g. a maximum drift speed of 20 m/s will earn a bonus of 10. ** '''maximum drift angle bonus''' - the value is the maximum drift angle (in radian) * 40 / PI e.g. a maximum drift angle of PI/4 (45 degrees) will earn a bonus of 10. If the car goes off track or spins out during a drift, the accumulated drift score is not added to the total score. An accumulated drift score of less than 5 is not added to the total either. [[Category:Playing]] dd22a7d57bd1ceb94f0ce47aac18dbffd73877a5 IForce FF support 0 39 527 526 2011-06-01T21:08:32Z Timo 6 3 Small reformat wikitext text/x-wiki == Linux == This was tested with Guillemot Ferrari Force Feedback Wheel USB, however, it should work on any wheel that uses the iforce kernel module. Kernel should be compiled with force feedback support for iforce module (a recent Ubuntu distribution works out of the box, 10.10 was tested, earlier should work too). Follow instructions on [[Setting up force feedback]], the important steps being: compile VDrift from source with forcefeedback support (SVN r3012 (27th Dec 2010) or later), edit ''VDrift.config'' and set up write permissions for ''/dev/input/eventX'' with something similar to: sudo chmod 777 /dev/input/eventX Follow VDrift console output for any force feedback related message; when working properly it should say the force feedback has been initialized. In Ubuntu you can do sudo apt-get install joystick to install test applications fftest and ffcfstress. fftest should work fine (although the effects are somewhat poor), but ffcfstress erroneously reports that the device has no force feedback support. Still, FF should work well in VDrift. In Windows the driver for the discontinued Guillemot wheel is the same as for Thrustmaster Ferrari Force Feedback Racing Wheel, so there is a good chance that the same applies for this particular Thrustmaster wheel. [[Category:Configuration]] db8f7754835712bbd56e5d232b4a24b7a9ec445e Old Method of Compiling on Mac OS X 0 61 745 744 2011-06-02T14:10:44Z Timo 6 3 wikitext text/x-wiki This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode 2.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4 costs $4.99 on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store], or get it by registering with Apple on the [http://developer.apple.com/programs/ iOS or Mac Developer Programs] for $99 a year. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Build== Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. You can see which files have added or removed in the output of 'svn update'. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] 6cf3d019517aa493e69dc309f7c353f935abde9a 746 745 2011-06-02T16:57:14Z Timo 6 3 wikitext text/x-wiki This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode 2.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4 costs $4.99 on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store], or get it by registering with Apple on the [http://developer.apple.com/programs/ iOS or Mac Developer Programs] for $99 a year. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Building== Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. You can see which files have added or removed in the output of 'svn update'. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] f30327048bfbf85e2c5942af3d5d636f2530b3d3 Packaging on Mac OS X 0 70 855 2011-06-02T16:59:25Z Timo 6 3 Spliting OSs from Packaging wikitext text/x-wiki This page documents how to package VDrift for release on the Mac OS X operating system. ==Prerequisites== Make sure you have a working build to release - check [[Getting the development version]] and [[Compiling on Mac OS X]]. ==Packaging== Open tools/osx/vdrift.xcodeproj and in Xcode 4 or higher click "Archive" in the "Product" menu, otherwise switch to the "Release-Deployment" Build style using the popup-menu in the toolbar and hit "Build" from XCode's "Build" menu. ==Result== Deployable Disk-images (full and minimal) will be put into the "Release-Deployment" build folder. [[Category:Development]] [[Category:Operating Systems:Mac OS X]] [[Category:Review]] ad46fbae52c1b1b401532730d24e6a7486f690d4 Packaging on Windows 0 71 858 2011-06-02T17:05:52Z Timo 6 3 Spliting OSs from Packaging wikitext text/x-wiki This page documents how to package VDrift for release on the Mac OS X operating system. ==Prerequisites== * Nullsoft installer system: http://nsis.sourceforge.net/ * A working build to release - check [[Getting the development version]] and [[Compiling on Windows]]. ==Packaging== In the directory tools/win you can find 2 .nsi files. One for the minimal release and one for the full release. If you installed nsis you can right click on the vdrift.nsi or vdrift-minimal.nsi file and select "compile script". The installer will be created now. '''Please do not forget to change the version in the .nsi files (at the top of the files)''' [[Category:Development]] [[Category:Operating Systems:Windows]] [[Category:Review]] bc4ea27337da1754dd65d5d2dfaf009d05ab09be Old Method of Installing on Mac OS X 0 64 816 815 2011-06-02T17:09:32Z Timo 6 3 wikitext text/x-wiki ==Prerequisites== * See [[Hardware requirements]] and [[Software requirements]]. * VDrift requires Mac OS X 10.4 "Tiger" or higher. ==Binary Install== * Download the latest VDrift release for Mac OS X from the link on the homepage at [http://vdrift.net/ vdrift.net] or [http://sourceforge.net/projects/vdrift/files/vdrift/ SourceForge]. * If it doesn't automatically open, double click the ''vdrift-yyyy-mm-dd.dmg'' file (probably in your download folder). * Drag or copy all the files and folders from the resulting mounted disk image named "VDrift" to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] 1c035dc9711c5387f53756c78969a7c598bcd89f Packaging 0 68 848 847 2011-06-02T17:14:19Z Timo 6 3 Spliting OSs wikitext text/x-wiki Packaging VDrift is different depending on the operating system on which it is packaged ==Linux== ''See [[Packaging on Linux]]'' ==FreeBSD== ''See [[Packaging on FreeBSD]]'' ==Mac OS X== ''See [[Packaging on Mac OS X]]'' ==Windows== ''See [[Packaging on Windows]]'' [[Category:Development]] b54ea99defb2c0d55e90cadfe0c7f83e30e00a2b 849 848 2011-06-02T17:16:51Z Timo 6 3 wikitext text/x-wiki Packaging VDrift is different depending on the operating system on which it is packaged. ==Linux== ''See [[Packaging on Linux]]'' ==FreeBSD== ''See [[Packaging on FreeBSD]]'' ==Mac OS X== ''See [[Packaging on Mac OS X]]'' ==Windows== ''See [[Packaging on Windows]]'' [[Category:Development]] 182fd38338d6e238a9cb4abc3610b41bb783d46e Packaging on Linux 0 69 852 2011-06-02T17:15:51Z Timo 6 3 Spliting OSs from Packaging wikitext text/x-wiki Make sure you have a working build to release - check [[Getting the development version]] and [[Compiling on Linux]]. ==Binary packages with autopackage== ===Prerequisites=== There are some things you need before you can build an autopackage. First and most importantly, the autopackage development tools are needed. As of this writing, only the version in autopackage svn will correctly build the VDrift packages. The next release of the autopackage tools should have all the patches needed to build proper packages. BinReloc is used by VDrift but the code has been imported and you do not need to download this to build a package. You do however need apbuild. Second, you must have two different compilers installed on your machine. This is to do the double-compiling so the vdrift binary will work on Linux no matter what version of glibc was used to build the distribution. Currently, the VDrift package setup uses g++-3.3 and g++-4.1, with gcc-4.1. Another known working setup is g++-3.3, g++-3.4, and gcc-3.4. The compiler versions are set in the tools/autopackage/vdrift.apspec file in [[Getting the development version|VDrift SVN]]. ===Building=== The [http://autopackage.org/ autopackage] project is a very promising and useful next-generation packaging tool for Linux. It aims to help developers create packages that will work on any Linux distribution. VDrift's autopackage creation is integrated into the SCons build system used to build the Linux version of VDrift. To build an autopackage, simply run scons autopackage Two options are important when running this command, '''minimal''' and '''release'''. For instance, scons autopackage minimal=1 will build a package with the minimal data set. This can be combined with the release option to make a release-optimized package with the minimal data set: scons autopackage minimal=1 release=1 Turning these options to 0 turns them off. This affects the package built as one might expect. The package name reflects how it was built. For example: VDrift yyyy-mm-dd-dev-minimal.package VDrift yyyy-mm-dd-full.package Usually the file is renamed to replace the space with a '-' character, so that the URL to the package does not have to contain a "%20". ==Source packages== Source packages are made in a similar way as autopackages using SCons. scons src-package builds a package named similarly. This package is put into the build/ directory. Currently the build system does tar the source package after compiling it in the build/ directory, but it includes the build directory as a parent in the archive itself. Since this function is not used that much, it has been a low priority to fix, and it is also pretty simple to just run tar manually and create the package. Before doing this however, it is useful to warn the user that there is no data in the source package and they must download one of the source packages in order to install the game. This can be done by replacing the file data/SConscript in the file with the file in the SVN repository data/SConscript.no_data. This is a minor change made to the build system when source packages are made. So, to make all this make sense, here are the commands to build a source package correctly: scons src-package cd build cp ../data/SConscript.no_data data/SConscript tar -jcvf vdrift-yyyy-mm-dd-src.tar.bz2 vdrift-yyyy-mm-dd-src/ Thus you end up with the file '''vdrift-yyyy-mm-dd-src.tar.bz2''' as a finished source package. [[Category:Development]] [[Category:Operating Systems:Linux]] [[Category:Review]] 738f230ba0858d8919d3bdf4605f86824c2b7a26 853 852 2011-07-03T21:15:34Z Timo 6 3 /* Prerequisites */ Change from SVN to Git wikitext text/x-wiki Make sure you have a working build to release - check [[Getting the development version]] and [[Compiling on Linux]]. ==Binary packages with autopackage== ===Prerequisites=== There are some things you need before you can build an autopackage. First and most importantly, the autopackage development tools are needed. As of this writing, only the version in autopackage svn will correctly build the VDrift packages. The next release of the autopackage tools should have all the patches needed to build proper packages. BinReloc is used by VDrift but the code has been imported and you do not need to download this to build a package. You do however need apbuild. Second, you must have two different compilers installed on your machine. This is to do the double-compiling so the vdrift binary will work on Linux no matter what version of glibc was used to build the distribution. Currently, the VDrift package setup uses g++-3.3 and g++-4.1, with gcc-4.1. Another known working setup is g++-3.3, g++-3.4, and gcc-3.4. The compiler versions are set in the tools/autopackage/vdrift.apspec file in [[Getting the development version|VDrift Git]]. ===Building=== The [http://autopackage.org/ autopackage] project is a very promising and useful next-generation packaging tool for Linux. It aims to help developers create packages that will work on any Linux distribution. VDrift's autopackage creation is integrated into the SCons build system used to build the Linux version of VDrift. To build an autopackage, simply run scons autopackage Two options are important when running this command, '''minimal''' and '''release'''. For instance, scons autopackage minimal=1 will build a package with the minimal data set. This can be combined with the release option to make a release-optimized package with the minimal data set: scons autopackage minimal=1 release=1 Turning these options to 0 turns them off. This affects the package built as one might expect. The package name reflects how it was built. For example: VDrift yyyy-mm-dd-dev-minimal.package VDrift yyyy-mm-dd-full.package Usually the file is renamed to replace the space with a '-' character, so that the URL to the package does not have to contain a "%20". ==Source packages== Source packages are made in a similar way as autopackages using SCons. scons src-package builds a package named similarly. This package is put into the build/ directory. Currently the build system does tar the source package after compiling it in the build/ directory, but it includes the build directory as a parent in the archive itself. Since this function is not used that much, it has been a low priority to fix, and it is also pretty simple to just run tar manually and create the package. Before doing this however, it is useful to warn the user that there is no data in the source package and they must download one of the source packages in order to install the game. This can be done by replacing the file data/SConscript in the file with the file in the SVN repository data/SConscript.no_data. This is a minor change made to the build system when source packages are made. So, to make all this make sense, here are the commands to build a source package correctly: scons src-package cd build cp ../data/SConscript.no_data data/SConscript tar -jcvf vdrift-yyyy-mm-dd-src.tar.bz2 vdrift-yyyy-mm-dd-src/ Thus you end up with the file '''vdrift-yyyy-mm-dd-src.tar.bz2''' as a finished source package. [[Category:Development]] [[Category:Operating Systems:Linux]] [[Category:Review]] 63c838912ef6981eb8cd3b24b52497236dca237c Useful links 0 84 966 965 2011-07-03T20:49:01Z Timo 6 3 Change source repo from SVN to Git wikitext text/x-wiki The VDrift community is an always expanding world of open source game developers, gamers on all platforms, artists and designers, and car tuners. It is based totally on the internet. The following links might be useful for users and developers of VDrift. ==VDrift== VDrift has several web sites devoted to the project and development. They are: * [http://vdrift.net/ Home] - The main project web site, includes news and forums, and general project information. * [http://cars.vdrift.net/ Cars] - VDrift cars database. * [http://vdrift.net/Forum/ Forum] - Discuss new features and development, report bugs and get help with problems in the forums. * [http://sourceforge.net/projects/vdrift SourceForge] - VDrift downloads are hosted on SourceForge, as well as the data repository. * [https://github.com/VDrift/vdrift GitHub] - This includes a public browser for the main VDrift Git tree, as well as HTTP access to the tree itself. * [http://wiki.vdrift.net/ Wiki] - The VDrift Wiki is the home of all the project's documentation. * [http://code.google.com/p/vdrift/issues/list Issue Tracker] - Tracks the fixing of bugs and implementing of new features. * [http://vdrift.net/staticpages/index.php?page=irc-chat Chat] - IRC channel used both for developer discussion and user support. If you have a problem or question feel free to stop by and ask. ==Driving Simulation Information== These are some links to general driving simulation information and communities: * Wikipedia: [http://en.wikipedia.org/wiki/Sim_racing Sim racing], [http://en.wikipedia.org/wiki/Racing_video_game Racing video game] - General information about simulated racing games. * [http://www.miata.net/sport/Physics/ Physics of Racing] - A series of articles about the physics of racing cars. * [http://www.cescg.org/CESCG-2003/SDeak/index.html Dynamical Simulation in a Driving Simulator] - A paper that addresses some important aspects of building a graphical model and a dynamical model for a driving simulator. * [http://www.racesimcentral.com/ Race Sim Central] - Racing simulation news and forums. * [http://www.racedepartment.com/content/ RaceDepartment] - Racing simulation community. ==Open Source Driving Simulators and Racing Games== Some more driving simulators: * [http://torcs.org/ The Open Race Car Simulator (TORCS)] - A car racing simulation focusing on AI racing and research. It can also be used as a ordinary car racing game too. * [http://sourceforge.net/projects/trigger-rally/ Trigger Rally] - A fast-paced open source rally racing game. * [http://vamos.sourceforge.net/ Vamos Automotive Simulator] - A automotive simulation framework with an emphasis on thorough physical modeling and good C++ design. It includes a real-time, first-person, 3D driving application. * [http://speed-dreams.sourceforge.net/ Speed Dreams] - A fork of the TORCS, aiming to implement exciting new features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as constantly improving visual and physics realism. * [http://supertuxkart.sourceforge.net/ Super TuxCart] - A free 3D kart racing game * [http://code.google.com/p/vdrift-ogre/ Stunt Rally] - A racing game that focuses on closed rally tracks with possible stunt elements (jumps, loops, pipes). It uses VDrift for car simulation. [[Category:External Resources]] 4533098cfa095e59bc9aa13417803a52f125a241 Creating cars 0 25 408 407 2011-07-03T20:52:09Z Timo 6 3 /* Get the Art Tools */ Change from SVN to Git wikitext text/x-wiki {{update}} This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] [[Category:Update]] fadb188dbfaadbf737d30271a280ebb8c505c313 Listedit tool 0 51 578 577 2011-07-03T21:01:02Z Timo 6 3 /* list.txt format */ Change link to git version of file. wikitext text/x-wiki Listedit is part of the [[Track editor]] tools that simplifies working on [[Track files and formats#list.txt|list.txt]] files. It is a command line style program. ==list.txt format== The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location: https://github.com/VDrift/trackeditor/blob/master/listedit/format.txt The numbers next to each of the lines is important to the way the listedit program works. ==Commands== The basic commands are * '''load''' * '''save''' * '''ls''' * '''set''' * '''quit''' * '''addparam''' Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format. ===ls=== The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do: ls 1 sky* To find all of the objects that have the skybox property set to true (1), do: ls 4 1 ===set=== The '''set''' command is similar to '''ls'''. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do: set 1 sky* 4 1 {{note|All of the objects will start with default properties.}} ===addparam=== This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter. [[Category:Tracks]] [[Category:Review]] d142a599e5e151c782f9cca3a4fff9097593dacd 579 578 2011-07-03T21:01:19Z Timo 6 3 /* list.txt format */ wikitext text/x-wiki Listedit is part of the [[Track editor]] tools that simplifies working on [[Track files and formats#list.txt|list.txt]] files. It is a command line style program. ==list.txt format== The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location: https://github.com/VDrift/trackeditor/blob/master/listedit/format.txt The numbers next to each of the lines is important to the way the listedit program works. ==Commands== The basic commands are * '''load''' * '''save''' * '''ls''' * '''set''' * '''quit''' * '''addparam''' Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format. ===ls=== The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do: ls 1 sky* To find all of the objects that have the skybox property set to true (1), do: ls 4 1 ===set=== The '''set''' command is similar to '''ls'''. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do: set 1 sky* 4 1 {{note|All of the objects will start with default properties.}} ===addparam=== This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter. [[Category:Tracks]] [[Category:Review]] bc344bbb9df9d7605218b1267518a1726fcaae9b Contribution 0 23 370 369 2011-07-03T21:07:14Z Timo 6 3 /* Reporting bugs, requesting features */ Add reference to GitHub issues. wikitext text/x-wiki ==How you can help== We can always use help with: * Testing & bug reports * Feedback and feature ideas * Documentation * Packaging * Game data (cars & tracks) * Other game art (splash screens, menu graphics, sounds) * Promotion * Web site * User support * Coding new features If you want to get started helping us out, the best way is to post on the [http://vdrift.net/Forum/index.php forums], join our [http://vdrift.net/staticpages/index.php/irc-chat IRC channel] and chat with the other developers, or just start developing! If you submit good patches, and we get to know you, we'll probably give you SVN commit access so you can do work on your own. ==Reporting bugs, requesting features== You can post in our [http://vdrift.net/Forum/index.php forums], under [http://vdrift.net/Forum/index.php?forum=3 Bugs] or [http://vdrift.net/Forum/index.php?forum=2 Feature Requests] or in the GitHub issues section: https://github.com/VDrift/vdrift/issues. ===Search!=== Please [http://vdrift.net/Forum/search.php search the forums] before beginning a new topic, as some bugs may already have been already identified, and many features have been requested multiple times. ===Bug reporting guidelines=== Generally we will need to know the operating system, type of machine (32-bit or 64-bit is very important), amount of memory, type of video card (plus amount of video RAM), and version of the game you are running. Sometimes it may help to know which versions of SDL and other libraries VDrift uses are on your system (Linux/FreeBSD). It also helps to know what options you're using in the game. If your problem is related to driving, please include in your report the input device you use and other control options. Likewise if you're having display issues it's helpful to know what display settings you're using. A good way to tell us about your configuration is to include in your report your [[VDrift.config]] file, or at least the sections of it relavent to the problem. ===Tips=== * When you start your topic make sure to give it a meaningful title, like "Crash when changing display properties on Windows64". * If you can provide a "use-case" or series of steps that you took in the game that will help to reproduce the bug, this will greatly increase the chances that it will be fixed. ==Submitting a patch== When posting a patch in the forums, please make sure you surround the content of your patch with the <b>[code]</b> and <b>[/code]</b> tags. This ensures it will be formatted properly. Also, be sure to preview your post before submitting it, and check it for errors. You may need to check in the "disable smileys" checkbox to make sure that some of your code is not changed into happy-faces. Patches should be made with [http://www.gnu.org/software/diffutils/diffutils.html diff] against the latest [[Getting the development version|development version]] of VDrift. If you don't know how to make a patch, try [http://www.google.com/search?q=how+to+make+a+patch+diff googling]. {{note|The Subversion command <code>svn diff</code> does not seem to provide a format that can be automatically applied to the source with the '''patch''' program. If your patch is very long, please use the actual diff utility, or request SVN commit access. Otherwise your patch will be delayed because we'll have to apply it by hand.}} [[Category:General Info]] [[Category:Review]] a4611c173ec5f227ca2a2cd1d50801282dbe49c5 371 370 2011-07-03T21:11:31Z Timo 6 3 /* Submitting a patch */ Add reference to pull requests on GitHub. wikitext text/x-wiki ==How you can help== We can always use help with: * Testing & bug reports * Feedback and feature ideas * Documentation * Packaging * Game data (cars & tracks) * Other game art (splash screens, menu graphics, sounds) * Promotion * Web site * User support * Coding new features If you want to get started helping us out, the best way is to post on the [http://vdrift.net/Forum/index.php forums], join our [http://vdrift.net/staticpages/index.php/irc-chat IRC channel] and chat with the other developers, or just start developing! If you submit good patches, and we get to know you, we'll probably give you SVN commit access so you can do work on your own. ==Reporting bugs, requesting features== You can post in our [http://vdrift.net/Forum/index.php forums], under [http://vdrift.net/Forum/index.php?forum=3 Bugs] or [http://vdrift.net/Forum/index.php?forum=2 Feature Requests] or in the GitHub issues section: https://github.com/VDrift/vdrift/issues. ===Search!=== Please [http://vdrift.net/Forum/search.php search the forums] before beginning a new topic, as some bugs may already have been already identified, and many features have been requested multiple times. ===Bug reporting guidelines=== Generally we will need to know the operating system, type of machine (32-bit or 64-bit is very important), amount of memory, type of video card (plus amount of video RAM), and version of the game you are running. Sometimes it may help to know which versions of SDL and other libraries VDrift uses are on your system (Linux/FreeBSD). It also helps to know what options you're using in the game. If your problem is related to driving, please include in your report the input device you use and other control options. Likewise if you're having display issues it's helpful to know what display settings you're using. A good way to tell us about your configuration is to include in your report your [[VDrift.config]] file, or at least the sections of it relavent to the problem. ===Tips=== * When you start your topic make sure to give it a meaningful title, like "Crash when changing display properties on Windows64". * If you can provide a "use-case" or series of steps that you took in the game that will help to reproduce the bug, this will greatly increase the chances that it will be fixed. ==Submitting a patch== When posting a patch in the forums, please make sure you surround the content of your patch with the <b>[code]</b> and <b>[/code]</b> tags. This ensures it will be formatted properly. Also, be sure to preview your post before submitting it, and check it for errors. You may need to check in the "disable smileys" checkbox to make sure that some of your code is not changed into happy-faces. Patches should be made with [http://www.gnu.org/software/diffutils/diffutils.html diff] against the latest [[Getting the development version|development version]] of VDrift. If you don't know how to make a patch, try [http://www.google.com/search?q=how+to+make+a+patch+diff googling]. {{note|The Subversion command <code>svn diff</code> does not seem to provide a format that can be automatically applied to the source with the '''patch''' program. If your patch is very long, please use the actual diff utility, or request SVN commit access. Otherwise your patch will be delayed because we'll have to apply it by hand.}} You can also submit a pull request if you have forked VDrift on [https://github.com/VDrift/vdrift GitHub]. See [[Getting the development version#Working with the repository|Getting the development version]]. [[Category:General Info]] [[Category:Review]] ddccf13227d47edc0799e2ef8bcefd5ad363fcee Creating tracks 0 26 441 440 2011-07-03T21:13:30Z Timo 6 3 Change from SVN to Git wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: https://github.com/VDrift/blender-scripts Get the "export-all-joe-0.3.py" script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: git clone https://github.com/VDrift/trackeditor vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt. At least one .joe file should get created for the curve track. Also verify that list.txt is mentioning all the .joe files. An empty list.txt will not load anything in the editor. * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Create a TRACKEDITOR_TP/track.txt file with at least a line "cull faces = on". track.txt is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within vdrift game. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in track.txt if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] [[Category:Review]] fcb8875560232256588219f65df16429dba72fa4 License 0 49 569 568 2011-07-03T21:41:50Z Timo 6 3 /* GPL */ Update to version 3. wikitext text/x-wiki VDrift is released under the GNU General Public License (GPL). It is free software. ==GPL== GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. [[Category:General Info]] a5dd96fad3cd5cfae77eed28b97c858309528ebd Old Method of Compiling on Linux 0 60 732 731 2011-07-06T12:56:46Z Timo 6 3 wikitext text/x-wiki {{Update}} ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libasio-dev libboost-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] 68468e4be298fe1ace3832f7fd96e6414c291fed 733 732 2011-07-11T18:17:05Z NaN 4 /* Prerequisites */ wikitext text/x-wiki {{Update}} ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libbullet-dev libasio-dev libboost-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] 4ea8e01629ecb02e0615feee5a3272c5b68944ba Software requirements 0 77 909 908 2011-07-06T20:01:36Z Timo 6 3 wikitext text/x-wiki {{update}} The following software needs to be installed on a computer for it to run VDrift. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Linux * FreeBSD * Mac OS X * Windows ==Device Drivers== It is advisable to always use the latest version of the device driver for [[Hardware requirements#Graphics Device|graphics cards]]. ==Libraries== Compilation and execution depend on the following libraries: * [http://www.libsdl.org/ SDL] ** [http://www.libsdl.org/projects/SDL_image/ SDL_image] ** [http://www.ferzkopp.net/joomla/content/view/19/14/ SDL_gfx] * [http://xiph.org/vorbis/ Vorbis] * [http://www.opengl.org/ OpenGL] ** GLU * [http://glew.sourceforge.net/ GLEW] * [http://think-async.com/ asio] * [http://www.boost.org/doc/libs/release/libs/bind/bind.html Boost::Bind] * pthread To [[Compiling|compile]], it is necessary to install the header files for these libraries. On some operating systems, such as Linux and FreeBSD, these libraries must be installed on the system first before VDrift will run. On other systems, such as Mac OS X and Windows, all the necessary library files are packaged with VDrift. ===Bullet=== The [http://bulletphysics.org Bullet Physics library] is used by VDrift, but it is not necessary for the user to take any action to acquire it. The Bullet source code is included in the VDrift source code, and it is compiled along with the executable at build time. ==Build Tools== To compile VDrift, you'll also need * [http://gcc.gnu.org/ GNU C++ compiler] (version 3.2 or greater) * [http://www.scons.org/ SCons] Other build tools are sometimes required, and alternative build options are sometimes available, depending on the target operating system (see [[Compiling]] for details). [[Category:Installation]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] [[Category:Review]] d3728660c7ed59c96ce638d03da42e265ed89d52 Old Method of Compiling on Windows 0 62 760 759 2011-07-26T10:25:56Z NaN 4 /* Windows */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ====Boost==== Download a Boost distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=7586&package_id=8041&release_id=679861 Uncompress Boost, and move the boost_1_39_0/boost folder to VDrift/tools/win/include ====ASIO==== Download the ASIO distribution from this link: http://sourceforge.net/project/showfiles.php?group_id=122478&package_id=134200&release_id=665620 Uncompress ASIO, and move asio-1.4.1/include/* to VDrift/tools/win/include ====cURL==== * Download cURL source(curl-7.21.4.zip) from this link: http://curl.haxx.se/download.html * Import lib/vc6libcurl.dsp into codeblocks. * In Build options/Linker Settings delete "DLL-Debug/libcurld_imp and --implib DLL-Debug/libcurld_imp.lib * Build Win32 DLL Release * Copy lib/DLL-Release/libcurl.dll to vdrift/tools/win/dll * Copy include/curl to vdrift/tools/win/include ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] d1ccacd14345dcd0e135da8eaa14d98b4c3b322d 761 760 2011-07-26T10:26:28Z NaN 4 /* Source and Data */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. {{note|From this point on the directory in which you checked out VDrift will be referred to as the root VDrift directory. The development environment setup script puts this in an environment variable $VDRIFT_DIR.}} ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 833542462cef7952d272097576b21890db08198a 762 761 2011-07-26T10:26:47Z NaN 4 /* VDrift */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.cbp and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] b3ed4e1b8cdd2dec09859ee9ec5b6552a5e4d37e 763 762 2011-07-26T10:27:25Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW tools. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 058056604e278985c38b6068a009d3b9f36b4324 764 763 2011-07-26T10:27:50Z NaN 4 /* Building with Scons */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 0086bf5ab591bdab324cbba03ce306a221556c27 765 764 2011-07-26T10:28:07Z NaN 4 /* VDrift */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== {{note|The versions listed for these tools were the ones used at time of this writing (current stable versions of all packages), there may be new versions. This is a known working configuration.}} ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] c23b5777454d623c3cdaad5ec537d96ed80d1267 766 765 2011-07-26T10:29:18Z NaN 4 /* Windows */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ====Building with Code::Blocks==== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 71e1126f54425eace614d079dab03be5bdb39384 767 766 2011-07-26T10:30:30Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== ====MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] ba6a7ea1f2885234a2e7ca0ae26e29700b423333 768 767 2011-07-26T10:30:56Z NaN 4 /* MinGW */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ====Building with Scons==== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). =====Building with batch script===== * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 0f14c8e15571383231db2c9341f44eb083052457 769 768 2011-07-26T10:31:17Z NaN 4 /* Building with Scons */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * [http://forums.codeblocks.org/index.php/board,20.0.html Download Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] dcf5ff2938e174ea83ed4c16a3f84f74a4c070a2 770 769 2011-07-26T10:32:55Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Download Python 2.6.4] * Run the installer and accept all the defaults. * [http://www.scons.org/ Download SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 7ee5fd7aa8bb5ff81d4cdb2d64fba1ffd1040ef1 771 770 2011-07-26T10:33:26Z NaN 4 /* Building with Scons */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 9499f24d9585c0b6faa295053c642e8e4be517ac 772 771 2011-07-26T11:29:47Z NaN 4 /* Source and Data */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ====Bullet==== Download http://bullet.googlecode.com/files/bullet-2.78.zip Extract bullet-2.78/src/ content into tools/win/bullet/ ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 777784cf2a1711bd35a06017581a39a55bbed7ee 773 772 2011-07-26T11:30:29Z NaN 4 /* Windows */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ====Bullet==== Download [http://bullet.googlecode.com/files/bullet-2.78.zip bullet-2.78] Extract bullet-2.78/src/ content into tools/win/bullet/ ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 406d0cbb0c2d99c7974ee3013c32532aca9b08ee 774 773 2011-07-26T11:30:49Z NaN 4 /* Windows */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ====Bullet==== * Download [http://bullet.googlecode.com/files/bullet-2.78.zip bullet-2.78] * Extract bullet-2.78/src/ content into tools/win/bullet/ ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] c8e35dcaef44d6ac995768bff7e07ed98b3fce79 775 774 2011-07-26T11:32:24Z NaN 4 /* Windows */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ====Bullet==== * Download [http://code.google.com/p/bullet/downloads/list bullet-2.78] * Extract bullet-2.78/src/ content into tools/win/bullet/ ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 060cded666099c8afcf7378251f1e08f64c5ee5c 776 775 2011-07-26T11:32:46Z NaN 4 /* Bullet */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ====Bullet==== * Download [http://code.google.com/p/bullet/downloads/list Bullet 2.78 Physics SDK] * Extract bullet-2.78/src/ content into tools/win/bullet/ ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 7d12e2ccd479402c49903b0a3b740d0302a8d745 777 776 2011-07-26T11:33:03Z NaN 4 /* VDrift */ wikitext text/x-wiki ==Windows== In order to build VDrift for Windows, you must set up the tools to build the software, build VDrift, and then install VDrift into a runtime folder. ===Source and Data=== ====VDrift==== * Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ====Bullet==== * Download [http://code.google.com/p/bullet/downloads/list Bullet 2.78 Physics SDK] * Extract bullet-2.78/src/ content into tools/win/bullet/ ===Install and Configure Build Tools=== ====GCC/MinGW==== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ===Building with Code::Blocks=== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ===Building with Scons=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ===Run VDrift=== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] e3d89bc57491e00c98b310461834b2fe36dc4731 778 777 2011-07-26T11:38:39Z NaN 4 /* Windows */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Bullet=== * Download [http://code.google.com/p/bullet/downloads/list Bullet 2.78 Physics SDK] * Extract bullet-2.78/src/ content into tools/win/bullet/ ===GCC/MinGW=== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ==Building with Code::Blocks== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open the project file in tools\win\vdrift.workspace and build vdrift. ==Building with Scons== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] cec892dc6c8b5eed64b642d3fbf1a95cd1f2ba21 779 778 2011-07-26T11:40:41Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===Bullet=== * Download [http://code.google.com/p/bullet/downloads/list Bullet 2.78 Physics SDK] * Extract bullet-2.78/src/ content into tools/win/bullet/ ===GCC/MinGW=== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] or [http://www.tdragon.net/recentgcc/ TDM's GCC/mingw32] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ==Building with Code::Blocks== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open tools\win\vdrift.workspace and build vdrift. ==Building with Scons== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] bbad7033b1bec993601b9b26c64e937ec276394f Creating cars 0 25 412 411 2011-07-26T15:43:39Z Timo 6 3 Remove spam links. wikitext text/x-wiki {{update}} This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] [[Category:Update]] fadb188dbfaadbf737d30271a280ebb8c505c313 414 413 2011-07-27T16:14:09Z Timo 6 3 Undo revision 1410 by [[Special:Contributions/ElizabethMorrill]] ([[User talk:ElizabethMorrill]]) Remove spam again. wikitext text/x-wiki {{update}} This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] [[Category:Update]] fadb188dbfaadbf737d30271a280ebb8c505c313 416 415 2011-07-30T13:56:51Z Timo 6 3 Undo revision 1415 by [[Special:Contributions/GracePerkins]] ([[User talk:GracePerkins]]) Remove more spam. wikitext text/x-wiki {{update}} This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] [[Category:Update]] fadb188dbfaadbf737d30271a280ebb8c505c313 418 417 2011-07-31T16:26:56Z Venzon 1 Reverted edits by [[Special:Contributions/GeorginaBevan|GeorginaBevan]] ([[User_talk:GeorginaBevan|Talk]]); changed back to last version by [[User:Timo 6|Timo 6]] wikitext text/x-wiki {{update}} This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] [[Category:Update]] fadb188dbfaadbf737d30271a280ebb8c505c313 Old Method of Compiling on Mac OS X 0 61 747 746 2011-07-26T15:47:19Z Timo 6 3 Update for xcode 4.1 wikitext text/x-wiki This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.1 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Building== Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. You can see which files have added or removed in the output of 'svn update'. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] 6b576cf3a45a1d220e1a16cc29705029202cf8d2 748 747 2011-08-25T16:24:57Z Timo 6 3 /* Error fixing */ Remove svn advice. wikitext text/x-wiki This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.1 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Building== Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] 64eba549c359e41fd2d828d08aeb29f867e8911f Old Method of Compiling on Linux 0 60 734 733 2011-07-27T16:08:45Z Venzon 1 /* Prerequisites */ wikitext text/x-wiki {{Update}} ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libbullet-dev libasio-dev libboost-dev libarchive-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] cea3b930b73673b1df129df550b7585b4578b3f5 735 734 2011-08-30T14:43:04Z Venzon 1 wikitext text/x-wiki {{Update}} ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libbullet-dev libasio-dev libboost-dev libcurl4-gnutls-dev libarchive-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] 634625c2d82006e3f3f7d81b51e2cfb2a1ad1fa6 736 735 2011-09-22T07:34:57Z NaN 4 /* Prerequisites */ wikitext text/x-wiki {{Update}} ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libbullet-dev libasio-dev libboost-dev libcurl4-gnutls-dev libarchive-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev {{note|VDrift requires libglew version greater than 1.5.3.}} For Ubuntu: * https://launchpad.net/~amuzen/+archive/ppa * Or download http://glew.sourceforge.net/ the zipped or tared version of glew (repo one doesn't build) and do "make; sudo make install" ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] af21d8ebd3885f8d4368c85b557a28998573f68f Autoupdate 0 7 67 2011-07-27T16:33:08Z Venzon 1 New page: This page describes, at a high level, how the auto-update function works. ==Introduction== One major barrier to releasing more often is the huge size of the VDrift releases. These large s... wikitext text/x-wiki This page describes, at a high level, how the auto-update function works. ==Introduction== One major barrier to releasing more often is the huge size of the VDrift releases. These large sizes are due to the large number of cars and tracks that are typically included in a release. If VDrift has auto-update functionality, then releases can be very minimal (one track and one car, for example) and people can download new cars and tracks (and keep their existing ones up to date) through an in-game interface. The rest of this document talks exclusively about updating cars, but tracks should work similarly. The auto-update functionality was first proposed in this forum post: http://vdrift.net/Forum/viewtopic.php?p=12999 ==User Interface== Several GUI pages have been added. From the main menu, the "Cars and Tracks" button takes the user to a page with options to check for updates and manage cars. When the user clicks "check for updates", the sourceforge svn browser html is scraped to get the latest revision numbers for the car folders. The car manager UI is populated from code and allows the user to see what updates are available and provides an "apply update" button. ==Versioning== There are two types of versioning: the versioning for each car folder, and the versioning for the car format. First, car folder versioning. The data/settings/updates.config file is distributed with each release, and contains the cars that have been included in that release along with their SVN revision numbers. When the game checks for updates, the sourceforge svn browser html is scraped to get the latest revision numbers, and that information ([available_cars] section) along with the current on-disk versions ([cars] section) are stored in an updates.config in the user's folder (~/.vdrift on linux). The game offers to apply updates when the on-disk versions are less than the available versions. Next, car format versioning. Sometimes, the format of car files changes in a way that breaks compatibility with old data files. To protect against updating cars to a format that the user's executables won't understand, format versions are stored in the updates.config file in the [formats] section. The version of the car format that the executable release understands is set in the data/settings/updates.config file included in the release (and copied to the user's folder). The game retrieves the latest data/settings/update.config via the sourceforge svn website and checks the format version there to make sure it matches the version number in the local update.config. If the format versions are not equal, updates will refuse to apply. cbaac2ef559771f013f560c8e91c5b3f249569eb 68 67 2011-07-27T20:30:55Z Venzon 1 wikitext text/x-wiki This page describes, at a high level, how the auto-update function works. ==Introduction== One major barrier to releasing more often is the huge size of the VDrift releases. These large sizes are due to the large number of cars and tracks that are typically included in a release. If VDrift has auto-update functionality, then releases can be very minimal (one track and one car, for example) and people can download new cars and tracks (and keep their existing ones up to date) through an in-game interface. The rest of this document talks exclusively about updating cars, but tracks should work similarly. The auto-update functionality was first proposed in this forum post: http://vdrift.net/Forum/viewtopic.php?p=12999 ==User Interface== Several GUI pages have been added. From the main menu, the "Cars and Tracks" button takes the user to a page with options to check for updates and manage cars. When the user clicks "check for updates", the sourceforge svn browser html is scraped to get the latest revision numbers for the car folders. The car manager UI is populated from code and allows the user to see what updates are available and provides an "apply update" button. ==Versioning== There are two types of versioning: the versioning for each car folder, and the versioning for the car format. First, car folder versioning. The data/settings/updates.config file is distributed with each release, and contains the cars that have been included in that release along with their SVN revision numbers. When the game checks for updates, the sourceforge svn browser html is scraped to get the latest revision numbers, and that information ([available_cars] section) along with the current on-disk versions ([cars] section) are stored in an updates.config in the user's folder (~/.vdrift on linux). The game offers to apply updates when the on-disk versions are less than the available versions. Next, car format versioning. Sometimes, the format of car files changes in a way that breaks compatibility with old data files. To protect against updating cars to a format that the user's executables won't understand, format versions are stored in the updates.config file in the [formats] section. The version of the car format that the executable release understands is set in the data/settings/updates.config file included in the release (and copied to the user's folder). The game retrieves the latest data/settings/update.config via the sourceforge svn website and checks the format version there to make sure it matches the version number in the local update.config. If the format versions are not equal, updates will refuse to apply. ==Updating== When the user clicks "apply update", the car format versioning is re-checked per the description above. If the car format versions mismatch, the game refuses to continue. Otherwise, updates are applied by fetching the .tar.gz bundle for a car's folder from sourceforge's http svn browser to a temporary folder (~/.vdrift/tmp on linux). This file then decompressed using libarchive into the settings directory (~/.vdrift on linux) under a "cars" subdir. The game should look here first when loading car files, and fall back to the global data path. The downloaded file is deleted once the update completes successfully, otherwise it leaves the temporary file around for troubleshooting. 4270dac8800ef155050eec43ceabdd3d1877ca1b 69 68 2011-07-31T16:12:50Z Venzon 1 wikitext text/x-wiki This page describes, at a high level, how the auto-update function works. ==Introduction== One major barrier to releasing more often is the huge size of the VDrift releases. These large sizes are due to the large number of cars and tracks that are typically included in a release. If VDrift has auto-update functionality, then releases can be very minimal (one track and one car, for example) and people can download new cars and tracks (and keep their existing ones up to date) through an in-game interface. The rest of this document talks exclusively about updating cars, but tracks should work similarly. The auto-update functionality was first proposed in this forum post: http://vdrift.net/Forum/viewtopic.php?p=12999 ==User Interface== Several GUI pages have been added. From the main menu, the "Cars and Tracks" button takes the user to a page with options to check for updates and manage cars. When the user clicks "check for updates", the sourceforge svn browser html is scraped to get the latest revision numbers for the car folders. The car manager UI is populated from code and allows the user to see what updates are available and provides an "apply update" button. ==Versioning== There are two types of versioning: the versioning for each car folder, and the versioning for the car format. First, car folder versioning. The data/settings/updates.config file is distributed with each release, and contains the cars that have been included in that release along with their SVN revision numbers. When the game checks for updates, the sourceforge svn browser html is scraped to get the latest revision numbers, and that information ([available_cars] section) along with the current on-disk versions ([cars] section) are stored in an updates.config in the user's folder (~/.vdrift on linux). The game offers to apply updates when the on-disk versions are less than the available versions. Next, car format versioning. Sometimes, the format of car files changes in a way that breaks compatibility with old data files. To protect against updating cars to a format that the user's executables won't understand, format versions are stored in the updates.config file in the [formats] section. The version of the car format that the executable release understands is set in the data/settings/updates.config file included in the release (and copied to the user's folder). The game retrieves the latest data/settings/update.config via the sourceforge svn website and checks the format version there to make sure it matches the version number in the local update.config. If the format versions are not equal, updates will refuse to apply. ==Updating== When the user clicks "apply update", the car format versioning is re-checked per the description above. If the car format versions mismatch, the game refuses to continue. Otherwise, updates are applied by fetching the .tar.gz bundle for a car's folder from sourceforge's http svn browser to a temporary folder (~/.vdrift/tmp on linux). This file then decompressed using libarchive into the settings directory (~/.vdrift on linux) under a "cars" subdir. The game should look here first when loading car files, and fall back to the global data path. The downloaded file is deleted once the update completes successfully, otherwise it leaves the temporary file around for troubleshooting. [[Category:Development]] 146c1a435a5a403dee201faa6b563d8d782df067 Old Method of Installing on Mac OS X 0 64 817 816 2011-08-17T19:13:09Z Timo 6 3 /* Binary Install */ Update dmg file name. wikitext text/x-wiki ==Prerequisites== * See [[Hardware requirements]] and [[Software requirements]]. * VDrift requires Mac OS X 10.4 "Tiger" or higher. ==Binary Install== * Download the latest VDrift release for Mac OS X from the link on the homepage at [http://vdrift.net/ vdrift.net] or [http://sourceforge.net/projects/vdrift/files/vdrift/ SourceForge]. * If it doesn't automatically open, double click the ''vdrift-mac-yyyy-mm-dd.dmg'' file (probably in your download folder). * Drag or copy all the files and folders from the resulting mounted disk image named "VDrift" to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] f7419b414a562f67af23d61bd03e6493837e9935 Working with the development version 0 90 1094 1093 2011-08-18T09:16:33Z Timo 6 3 Update for new platform dependancies repos. wikitext text/x-wiki VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== VDrift's source on the GitHub web site is at https://github.com/VDrift/vdrift/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an copy of the source code and your platform's dependencies. ===Linux/Unix=== Install a git client (eg. [http://git-scm.com/ Git]). If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: git clone git://github.com/VDrift/vdrift.git vdrift It will download the current development version in the subfolder ''vdrift''. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://code.google.com/p/msysgit/ MSysGit]. After installing it, open Windows Explorer and go to the directory to which you want to download the VDrift source code. Right-click and click Git GUI Here. Select Open Existing Repository. In the next screen you need to fill in the URL of the repository which is git://github.com/VDrift/vdrift.git. Simply click OK, and the source code will be downloaded. Then do the same, but with the URL git://github.com/VDrift/vdrift-win.git and make sure that it downloads in a ''/vdrift-win'' directory in the main vdrift directory. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== First you will need to obtain a git client (eg. [http://mac.github.com/ GitHub for Mac]). Once you have a working Git client open a terminal and navigate to where you wish to download the VDrift source code. Then run the following code: git clone git://github.com/VDrift/vdrift.git vdrift to download the lastest source code to the subfolder ''vdrift''. Then navigate to the ''vdrift'' folder: cd vdrift and download the mac dependencies into the subfolder ''vdrift-mac'': git clone git://github.com/VDrift/vdrift-mac.git vdrift-mac Finally [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ==Checking out the data== The data set is currently only available from the SourceForge SVN (https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data). It needs to be checked out in a ''/data'' directory in the main vdrift directory. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called ''/home/user/vdrift'', you would do this: cd /home/user/vdrift svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data ==Working with the repository== See this documentation for more info: http://help.github.com/ ===Making your own changes=== If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repo on GitHub (https://github.com/VDrift/vdrift/). Just click the button near the top right of the page. You will need a free GitHub account. Then clone your new repo onto your computer: git clone git@github.com:''username''/vdrift.git And link this to the original VDrift repo: git remote add upstream git://github.com/VDrift/vdrift.git git fetch upstream ===Updating=== Once the reposotory has been checked out, it can be updated without downloading the entire thing again. For command line git, use the command git pull to check for updates and apply them. If you have made some changes, use the following instead to prevent these being lost: git fetch upstream git merge upstream/master ===Uploading changes=== To upload any changes you've made, first add the files to the commit: git add ''filename'' Then do the commit: git commit -m 'Commit message' And finally send this to GitHub: git push origin master ===Checking in changes=== You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/ Thank you for helping make VDrift better for everyone! [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 049a71f701aeae99a99d339dd313882e86fa6c2c 1097 1096 2012-02-08T22:35:26Z Timo 6 3 /* Updating */ Spelling! wikitext text/x-wiki See this documentation for more info: http://help.github.com/ ===Making your own changes=== If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repo on GitHub (https://github.com/VDrift/vdrift/). Just click the button near the top right of the page. You will need a free GitHub account. Then clone your new repo onto your computer: git clone git@github.com:''username''/vdrift.git And link this to the original VDrift repo: git remote add upstream git://github.com/VDrift/vdrift.git git fetch upstream ===Updating=== Once the repository has been checked out, it can be updated without downloading the entire thing again. For command line git, use the command git pull to check for updates and apply them. If you have made some changes, use the following instead to prevent these being lost: git fetch upstream git merge upstream/master ===Uploading changes=== To upload any changes you've made, first add the files to the commit: git add ''filename'' Then do the commit: git commit -m 'Commit message' And finally send this to GitHub: git push origin master ===Checking in changes=== You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/ Thank you for helping make VDrift better for everyone! [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 70574d1590d11cbfd4e7ed04de6cf716592efc88 Contribution 0 23 372 371 2011-08-25T16:32:00Z Timo 6 3 /* How you can help */ Talk about git pull requests, not svn commit access. wikitext text/x-wiki ==How you can help== We can always use help with: * Testing & bug reports * Feedback and feature ideas * Documentation * Packaging * Game data (cars & tracks) * Other game art (splash screens, menu graphics, sounds) * Promotion * Web site * User support * Coding new features If you want to get started helping us out, the best way is to post on the [http://vdrift.net/Forum/index.php forums], join our [http://vdrift.net/staticpages/index.php/irc-chat IRC channel] and chat with the other developers, or just start developing by forking the [https://github.com/VDrift/vdrift github repository]! If you submit good changes, we might merge your pull request so everyone else can use them. ==Reporting bugs, requesting features== You can post in our [http://vdrift.net/Forum/index.php forums], under [http://vdrift.net/Forum/index.php?forum=3 Bugs] or [http://vdrift.net/Forum/index.php?forum=2 Feature Requests] or in the GitHub issues section: https://github.com/VDrift/vdrift/issues. ===Search!=== Please [http://vdrift.net/Forum/search.php search the forums] before beginning a new topic, as some bugs may already have been already identified, and many features have been requested multiple times. ===Bug reporting guidelines=== Generally we will need to know the operating system, type of machine (32-bit or 64-bit is very important), amount of memory, type of video card (plus amount of video RAM), and version of the game you are running. Sometimes it may help to know which versions of SDL and other libraries VDrift uses are on your system (Linux/FreeBSD). It also helps to know what options you're using in the game. If your problem is related to driving, please include in your report the input device you use and other control options. Likewise if you're having display issues it's helpful to know what display settings you're using. A good way to tell us about your configuration is to include in your report your [[VDrift.config]] file, or at least the sections of it relavent to the problem. ===Tips=== * When you start your topic make sure to give it a meaningful title, like "Crash when changing display properties on Windows64". * If you can provide a "use-case" or series of steps that you took in the game that will help to reproduce the bug, this will greatly increase the chances that it will be fixed. ==Submitting a patch== When posting a patch in the forums, please make sure you surround the content of your patch with the <b>[code]</b> and <b>[/code]</b> tags. This ensures it will be formatted properly. Also, be sure to preview your post before submitting it, and check it for errors. You may need to check in the "disable smileys" checkbox to make sure that some of your code is not changed into happy-faces. Patches should be made with [http://www.gnu.org/software/diffutils/diffutils.html diff] against the latest [[Getting the development version|development version]] of VDrift. If you don't know how to make a patch, try [http://www.google.com/search?q=how+to+make+a+patch+diff googling]. {{note|The Subversion command <code>svn diff</code> does not seem to provide a format that can be automatically applied to the source with the '''patch''' program. If your patch is very long, please use the actual diff utility, or request SVN commit access. Otherwise your patch will be delayed because we'll have to apply it by hand.}} You can also submit a pull request if you have forked VDrift on [https://github.com/VDrift/vdrift GitHub]. See [[Getting the development version#Working with the repository|Getting the development version]]. [[Category:General Info]] [[Category:Review]] dea95162ff27da8fc78ba7544e87cce53d4d1f5a 373 372 2011-08-25T16:32:46Z Timo 6 3 /* Submitting a patch */ Remove svn note - we don't use it anymore. wikitext text/x-wiki ==How you can help== We can always use help with: * Testing & bug reports * Feedback and feature ideas * Documentation * Packaging * Game data (cars & tracks) * Other game art (splash screens, menu graphics, sounds) * Promotion * Web site * User support * Coding new features If you want to get started helping us out, the best way is to post on the [http://vdrift.net/Forum/index.php forums], join our [http://vdrift.net/staticpages/index.php/irc-chat IRC channel] and chat with the other developers, or just start developing by forking the [https://github.com/VDrift/vdrift github repository]! If you submit good changes, we might merge your pull request so everyone else can use them. ==Reporting bugs, requesting features== You can post in our [http://vdrift.net/Forum/index.php forums], under [http://vdrift.net/Forum/index.php?forum=3 Bugs] or [http://vdrift.net/Forum/index.php?forum=2 Feature Requests] or in the GitHub issues section: https://github.com/VDrift/vdrift/issues. ===Search!=== Please [http://vdrift.net/Forum/search.php search the forums] before beginning a new topic, as some bugs may already have been already identified, and many features have been requested multiple times. ===Bug reporting guidelines=== Generally we will need to know the operating system, type of machine (32-bit or 64-bit is very important), amount of memory, type of video card (plus amount of video RAM), and version of the game you are running. Sometimes it may help to know which versions of SDL and other libraries VDrift uses are on your system (Linux/FreeBSD). It also helps to know what options you're using in the game. If your problem is related to driving, please include in your report the input device you use and other control options. Likewise if you're having display issues it's helpful to know what display settings you're using. A good way to tell us about your configuration is to include in your report your [[VDrift.config]] file, or at least the sections of it relavent to the problem. ===Tips=== * When you start your topic make sure to give it a meaningful title, like "Crash when changing display properties on Windows64". * If you can provide a "use-case" or series of steps that you took in the game that will help to reproduce the bug, this will greatly increase the chances that it will be fixed. ==Submitting a patch== When posting a patch in the forums, please make sure you surround the content of your patch with the <b>[code]</b> and <b>[/code]</b> tags. This ensures it will be formatted properly. Also, be sure to preview your post before submitting it, and check it for errors. You may need to check in the "disable smileys" checkbox to make sure that some of your code is not changed into happy-faces. Patches should be made with [http://www.gnu.org/software/diffutils/diffutils.html diff] against the latest [[Getting the development version|development version]] of VDrift. If you don't know how to make a patch, try [http://www.google.com/search?q=how+to+make+a+patch+diff googling]. You can also submit a pull request if you have forked VDrift on [https://github.com/VDrift/vdrift GitHub]. See [[Getting the development version#Working with the repository|Getting the development version]]. [[Category:General Info]] [[Category:Review]] 6594c9047f894880847a79a4c23c1f665801d732 Packaging 0 68 850 849 2011-08-28T15:33:30Z Venzon 1 wikitext text/x-wiki Packaging VDrift is different depending on the operating system on which it is packaged. ==Common== The data/settings/updates.config file should be updated to contain the cars that will be included in the release along with their SVN revision numbers. ==Linux== ''See [[Packaging on Linux]]'' ==FreeBSD== ''See [[Packaging on FreeBSD]]'' ==Mac OS X== ''See [[Packaging on Mac OS X]]'' ==Windows== ''See [[Packaging on Windows]]'' [[Category:Development]] 681fac7a075cfded7d2d054fa34d05217c55abe5 About the project 0 4 35 34 2011-09-01T20:31:42Z Timo 6 3 /* Description */ Use GPL v3 wikitext text/x-wiki {{update}} ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v3. It is currently available for Linux, FreeBSD, Mac OS X and Windows. ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 40 tracks based on famous real-world tracks * Almost 40 cars based on real-world vehicles * Very realistic, simulation-grade driving physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake and reverse lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback * Race against up to 3 AI with variable difficultly * Engine and road sounds ==Goals== The goals of the VDrift project are: * to be a high-quality, open source racing simulation featuring enjoyable and challenging gameplay; * to take advantage of modern computing hardware to accurately simulate vehicle physics in rich and immersive racing environments; and * to provide a platform for creative experimentation to a community of developers and artists. ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. [[Category:General Info]] [[Category:Update]] 2d6bef884367decacba5d2b2de5a692a8370204c 36 35 2012-08-26T17:18:33Z Timo 6 3 12 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v3. It is currently available for Linux, FreeBSD, Mac OS X and Windows. ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 40 tracks based on famous real-world tracks * Almost 40 cars based on real-world vehicles * Very realistic, simulation-grade driving physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake and reverse lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback * Race against up to 3 AI with variable difficultly * Engine and road sounds ==Goals== The goals of the VDrift project are: * to be a high-quality, open source racing simulation featuring enjoyable and challenging gameplay; * to take advantage of modern computing hardware to accurately simulate vehicle physics in rich and immersive racing environments; and * to provide a platform for creative experimentation to a community of developers and artists. ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. [[Category:General Info]] [[Category:Update]] 2d6bef884367decacba5d2b2de5a692a8370204c Old Method of Compiling on Windows 0 62 780 779 2011-09-01T20:40:43Z NaN 4 /* Prerequisites */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Windows|development version]]. ===GCC/MinGW=== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ==Building with Code::Blocks== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open tools\win\vdrift.workspace and build vdrift. ==Building with Scons== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] d18e5eb37b37b206681df2b104f986c31b24e44e 781 780 2011-09-01T20:50:10Z NaN 4 /* VDrift */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain source revisions/tags from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ===GCC/MinGW=== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ==Building with Code::Blocks== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open tools\win\vdrift.workspace and build vdrift. ==Building with Scons== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 8a2467306b9c1d7a207f39d2617731cb67195df8 782 781 2011-09-01T20:51:07Z NaN 4 /* VDrift */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ===GCC/MinGW=== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ==Building with Code::Blocks== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open tools\win\vdrift.workspace and build vdrift. ==Building with Scons== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] ee83d022dc222eaf226187c9fbb87ace5931793b 783 782 2011-09-01T20:52:00Z NaN 4 /* Building with Scons */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ===GCC/MinGW=== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). ==Building with Code::Blocks== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open tools\win\vdrift.workspace and build vdrift. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 522aec8b5278040f8dfa51c54421a93c5a78a524 784 783 2011-09-01T20:53:43Z NaN 4 /* Prerequisites */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks== * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Open tools\win\vdrift.workspace and build vdrift. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 347886e4114ae2580acb881b2143531c7bf3467a 785 784 2011-09-01T20:56:02Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW] * Run the installer. * When asked to select components for install, you only need the base system and the g++ compiler. * Choose the default install location. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line in vdrift directory to generate the solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 0b33c346783b1e3b1fd46836cbd9695d0c8a9b62 786 785 2011-09-01T20:56:37Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line in vdrift directory to generate the solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 0fa85bed65842924bc95158c61fa239a24697bb8 787 786 2011-09-01T20:58:56Z NaN 4 wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line in vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line in vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 3f08fa46358b2b5d5e3668ab1c15fe4bbbe45ca2 788 787 2011-09-01T20:59:29Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line in vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] a3c2d31918764686b21edc7e6445c1c254abb79d 789 788 2011-09-01T20:59:57Z NaN 4 /* Building with MSVC */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] c363bd3377dbd19503ed64e86c953a2240bdb39b 790 789 2011-09-01T21:01:40Z NaN 4 /* Building with Scons(broken) */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 83b82e67159e53eaff364848638e2e0922a13b85 791 790 2011-09-01T21:02:06Z NaN 4 /* Building with Code::Blocks */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. You can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks/MinGW== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] d2cf5973d587d91b6370fbbb6732c500c6a9f6d2 792 791 2011-09-01T21:03:46Z NaN 4 /* VDrift */ wikitext text/x-wiki ==Prerequisites== ===VDrift=== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks/MinGW== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 44bc2b61c4704acb1aa46b7fd6ed77ec8a713006 793 792 2011-09-01T21:15:16Z NaN 4 /* VDrift */ wikitext text/x-wiki ==Prerequisites== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks/MinGW== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 25566644b972d0e7e53194dc81c56279771a5e23 Authors and contributors 0 6 63 62 2011-09-01T20:56:09Z Timo 6 3 /* Current Contributors */ wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page, or post in the forums.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to fix bugs in the game, as well as writing new subsystems and maintaining old ones. Joe created everything in VDrift which is not attributed to someone else below. The physics engine in the game was originally [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. As time went on it underwent many modifications. Now, the physics system has been rewritten. ==Current Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=5379 NaN] has rewritten the physics code, added car color selection, implemented multi-language menus, and continues to fix bugs and add new features. * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, much of the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. Chris is currently working on a driver training system with evaluation of driving behavior and driver feedback. * [http://vdrift.net/users.php?mode=profile&uid=1435 Francis Whittle] has improved the car suspension by adding new types of suspension. * [http://vdrift.net/users.php?mode=profile&uid=5534 Antonio Caiazzo] is working on a new AI system based on neural networks. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Tracks==== * [http://vdrift.net/users.php?mode=profile&uid=412 alex25] has imported most of the tracks from various sources, and helped maintain them over time. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=1337 Ny Dedes] TC6, LE, and is working on a new car, the ATT. also modeled the driver, and coded the mesh generation for tires and brake rotors. * [http://vdrift.net/users.php?mode=profile&uid=3407 Timothy Porter] is working on preparing freely-licensed car models for import, and polishing the track Rouen. ===Ports=== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] maintains the VDrift port for Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=2522 Timothy Furlong] helps maintain the VDrift port for Mac OS X and has helped to update and expand wiki pages. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] maintains the VDrift port for FreeBSD. ===Documentation=== * [http://vdrift.net/users.php?mode=profile&uid=2522 Timothy Furlong] has helped to update and expand wiki pages. ==Former Contributors== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * [http://vdrift.net/users.php?mode=profile&uid=755 rookie1] wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=5095 MirceaKitsune] contributed new skins for several cars, and several patches including adding reverse lights, sounds for gear, brake and handbrake, and a new car coloring implementation with adapted skins. * [http://vdrift.net/users.php?mode=profile&uid=710 cotharyus] improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helped with testing and debugging, worked on Debian GNU/Linux packaging, and improved the build system. * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] packaged VDrift for Slackware Linux and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=1356 Gonéri Le Bouder] worked on Debian GNU/Linux packaging and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] managed the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added the first version of internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. * [http://vdrift.net/users.php?mode=profile&uid=769 pwp71] helped maintain track data when new features became available. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 Tyler Fric] created the 360. [[Category:General Info]] 8ebfdde7e899ea803b28ce30ed9be6a47aced2ef 65 64 2012-01-28T22:02:29Z Timo 6 3 Undo revision 1607 by [[Special:Contributions/AlysiaSpike]] ([[User talk:AlysiaSpike]]) wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page, or post in the forums.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to fix bugs in the game, as well as writing new subsystems and maintaining old ones. Joe created everything in VDrift which is not attributed to someone else below. The physics engine in the game was originally [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. As time went on it underwent many modifications. Now, the physics system has been rewritten. ==Current Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=5379 NaN] has rewritten the physics code, added car color selection, implemented multi-language menus, and continues to fix bugs and add new features. * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, much of the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. Chris is currently working on a driver training system with evaluation of driving behavior and driver feedback. * [http://vdrift.net/users.php?mode=profile&uid=1435 Francis Whittle] has improved the car suspension by adding new types of suspension. * [http://vdrift.net/users.php?mode=profile&uid=5534 Antonio Caiazzo] is working on a new AI system based on neural networks. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Tracks==== * [http://vdrift.net/users.php?mode=profile&uid=412 alex25] has imported most of the tracks from various sources, and helped maintain them over time. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=1337 Ny Dedes] TC6, LE, and is working on a new car, the ATT. also modeled the driver, and coded the mesh generation for tires and brake rotors. * [http://vdrift.net/users.php?mode=profile&uid=3407 Timothy Porter] is working on preparing freely-licensed car models for import, and polishing the track Rouen. ===Ports=== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] maintains the VDrift port for Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=2522 Timothy Furlong] helps maintain the VDrift port for Mac OS X and has helped to update and expand wiki pages. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] maintains the VDrift port for FreeBSD. ===Documentation=== * [http://vdrift.net/users.php?mode=profile&uid=2522 Timothy Furlong] has helped to update and expand wiki pages. ==Former Contributors== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * [http://vdrift.net/users.php?mode=profile&uid=755 rookie1] wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=5095 MirceaKitsune] contributed new skins for several cars, and several patches including adding reverse lights, sounds for gear, brake and handbrake, and a new car coloring implementation with adapted skins. * [http://vdrift.net/users.php?mode=profile&uid=710 cotharyus] improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helped with testing and debugging, worked on Debian GNU/Linux packaging, and improved the build system. * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] packaged VDrift for Slackware Linux and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=1356 Gonéri Le Bouder] worked on Debian GNU/Linux packaging and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] managed the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added the first version of internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. * [http://vdrift.net/users.php?mode=profile&uid=769 pwp71] helped maintain track data when new features became available. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 Tyler Fric] created the 360. [[Category:General Info]] 8ebfdde7e899ea803b28ce30ed9be6a47aced2ef Logitech G25 support 0 52 596 595 2011-09-09T14:32:13Z Venzon 1 wikitext text/x-wiki ==Windows== The G25 should be fully supported in Windows without any special steps. ==Linux== When initially plugged in, the G25 will be in compatibility mode, which restricts the steering range and disables the clutch pedal and some of the gears on the H-shifter. VDrift includes two tools that can be used to change G25 modes. Either tool can be used; use whichever tool works the best for you. If you want to use force feedback, you'll need to patch your kernel because when set to native mode, the G25 change its product id, and this product id is not known yet by the kernel ( have a look here [[Enabling force feedback in kernel]] ) ===usbtool=== The tool can be found in VDrift/tools/usbtool-0.1.tar.gz. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example) as well as the swig package. Run ./build.sh and then run ./usbtool to see the options available. To set the wheel to native mode and the range to 900 degrees, run: sudo ./usbtool g25-set-range-wheel-900 and sudo ./usbtool g25-set-extended-mode This will likely disconnect the joystick driver. To reconnect it run: sudo rmmod joydev;sudo rmmod usbhid;sudo modprobe usbhid ===G25manage=== The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run make to compile the tool, then run: sudo ./G25manage --nativemode and sudo ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. ===LTWheelConf=== LTWheelConf is a new tool based on G25manage. https://github.com/TripleSpeeder/LTWheelConf ===Automatically enable native mode=== If your distribution uses udev (such as Ubuntu), you can put this in /etc/udev/rules.d/90-g25-wheel.rules to automatically run G25manage when the wheel is plugged in: SUBSYSTEM!="usb", GOTO="g25_rules_end" ACTION!="add", GOTO="g25_rules_end" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c294", RUN+="/usr/local/bin/G25manage --nativemode" #ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --range 900" LABEL="g25_rules_end" # for a joystick detected by the kernel event interface, with a model name "G25_Racing_Wheel change the permissions on the device file # and add a symlink to the event device file KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", SYMLINK+="input/G25event" KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", MODE="0664", GROUP="games" # No deadzone for the wheel on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=0" # No deadzone for the clutch pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=1" # No deadzone for the break pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=2" # No deadzone for the throttle pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=5" After creating that file and copying the G25manage binary to /usr/local/bin, run "/etc/init.d/udev reload" (or "service udev reload" on Ubuntu karmic) and you no longer have to manually run G25manage. [[Category:Configuration]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] [[Category:Expand]] d40697595c65029ecaee595656a21575e8d25137 Compiling VDrift 0 16 320 319 2011-12-13T05:05:20Z Venzon 1 /* Optional: Compile Options */ wikitext text/x-wiki Compiling VDrift depends upon the build environment beeing set up correctly. See [[Getting VDrift]]. Compiling VDrift makes it possible to [[Installing|Installing VDrift]]. Compiling VDrift is different depending on the operating system on which it is compiled. So follow the applicable passage. = Compiling on FreeBSD = To compile VDrift on FreeBSD, use the ports system. == Latest Release == If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends == Development Version == If you Downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends = Compiling on Linux = == Prerequisites == The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. === Bullet === For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update === LibGLEW === {{note|VDrift requires libglew version greater than 1.5.3.}} Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb === Ubuntu 8.04 === For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev === SCons === As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. === All other Packages === All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libarchive-dev libasio-dev \ libboost-dev libcurl4-gnutls-dev libdrm-dev \ libgl1-mesa-dev libglu1-mesa-dev libkms1 \ mesa-common-dev libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons == Optional: Using scons-local instead of installing SCons == If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} == Compiling == To compile VDrift, just use the <code>scons</code> command. scons === Optional: Compile Options === You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 To enable force feedback, use this option: scons force_feedback=1 You can get a list of all compile time options with: scons --help {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} == Installing == VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} === Optional: Installation Location === You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} = Compiling on Mac OS = == Prerequisites == The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.1 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. == Building == Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. == Error fixing == If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. = Compiling on Windows = == Prerequisites == * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. == Building with Code::Blocks/MinGW == * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. == Building with MSVC == * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. == Building with Scons(broken) == {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat == Installing VDrift Data == * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:Mac OS X]] [[Category:Operating Systems:Windows]] ccda9d5c1698197e5268dff11a0b16fe44d406c7 321 320 2012-01-20T22:56:45Z Timo 6 3 /* Compiling on Mac OS */ Add instructions for mac dependancies. wikitext text/x-wiki Compiling VDrift depends upon the build environment beeing set up correctly. See [[Getting VDrift]]. Compiling VDrift makes it possible to [[Installing|Installing VDrift]]. Compiling VDrift is different depending on the operating system on which it is compiled. So follow the applicable passage. = Compiling on FreeBSD = To compile VDrift on FreeBSD, use the ports system. == Latest Release == If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends == Development Version == If you Downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends = Compiling on Linux = == Prerequisites == The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. === Bullet === For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update === LibGLEW === {{note|VDrift requires libglew version greater than 1.5.3.}} Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb === Ubuntu 8.04 === For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev === SCons === As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. === All other Packages === All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libarchive-dev libasio-dev \ libboost-dev libcurl4-gnutls-dev libdrm-dev \ libgl1-mesa-dev libglu1-mesa-dev libkms1 \ mesa-common-dev libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons == Optional: Using scons-local instead of installing SCons == If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} == Compiling == To compile VDrift, just use the <code>scons</code> command. scons === Optional: Compile Options === You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 To enable force feedback, use this option: scons force_feedback=1 You can get a list of all compile time options with: scons --help {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} == Installing == VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} === Optional: Installation Location === You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} = Compiling on Mac OS = == Prerequisites == The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.2 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Dependencies== Download the Mac OS X dependancies into ''vdrift/vdrift-mac'' cd vdrift git clone https://github.com/VDrift/vdrift-mac.git == Building == Open ''vdrift/vdrift-mac/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from Xcode's "Build" menu. == Error fixing == If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. = Compiling on Windows = == Prerequisites == * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. == Building with Code::Blocks/MinGW == * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. == Building with MSVC == * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. == Building with Scons(broken) == {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat == Installing VDrift Data == * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:Mac OS X]] [[Category:Operating Systems:Windows]] a15ab7541a84c3176d65b630ec0c5b8f445db847 322 321 2012-02-08T22:14:34Z Timo 6 3 /* Prerequisites */ SDL_net is required. wikitext text/x-wiki Compiling VDrift depends upon the build environment beeing set up correctly. See [[Getting VDrift]]. Compiling VDrift makes it possible to [[Installing|Installing VDrift]]. Compiling VDrift is different depending on the operating system on which it is compiled. So follow the applicable passage. = Compiling on FreeBSD = To compile VDrift on FreeBSD, use the ports system. == Latest Release == If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends == Development Version == If you Downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends = Compiling on Linux = == Prerequisites == The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''sdl-net''' * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. === Bullet === For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update === LibGLEW === {{note|VDrift requires libglew version greater than 1.5.3.}} Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb === Ubuntu 8.04 === For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev === SCons === As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. === All other Packages === All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libarchive-dev libasio-dev \ libboost-dev libcurl4-gnutls-dev libdrm-dev \ libgl1-mesa-dev libglu1-mesa-dev libkms1 \ mesa-common-dev libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons == Optional: Using scons-local instead of installing SCons == If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} == Compiling == To compile VDrift, just use the <code>scons</code> command. scons === Optional: Compile Options === You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 To enable force feedback, use this option: scons force_feedback=1 You can get a list of all compile time options with: scons --help {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} == Installing == VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} === Optional: Installation Location === You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} = Compiling on Mac OS = == Prerequisites == The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.2 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Dependencies== Download the Mac OS X dependancies into ''vdrift/vdrift-mac'' cd vdrift git clone https://github.com/VDrift/vdrift-mac.git == Building == Open ''vdrift/vdrift-mac/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from Xcode's "Build" menu. == Error fixing == If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. = Compiling on Windows = == Prerequisites == * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. == Building with Code::Blocks/MinGW == * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. == Building with MSVC == * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. == Building with Scons(broken) == {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat == Installing VDrift Data == * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:Mac OS X]] [[Category:Operating Systems:Windows]] 902bc155e18359f62eb4b27bf8867215ece44f91 323 322 2012-02-19T17:07:59Z Timo 6 3 /* Prerequisites */ wikitext text/x-wiki Compiling VDrift depends upon the build environment beeing set up correctly. See [[Getting VDrift]]. Compiling VDrift makes it possible to [[Installing|Installing VDrift]]. Compiling VDrift is different depending on the operating system on which it is compiled. So follow the applicable passage. = Compiling on FreeBSD = To compile VDrift on FreeBSD, use the ports system. == Latest Release == If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends == Development Version == If you Downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends = Compiling on Linux = == Prerequisites == The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. === Bullet === For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update === LibGLEW === {{note|VDrift requires libglew version greater than 1.5.3.}} Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb === Ubuntu 8.04 === For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev === SCons === As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. === All other Packages === All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libarchive-dev libasio-dev \ libboost-dev libcurl4-gnutls-dev libdrm-dev \ libgl1-mesa-dev libglu1-mesa-dev libkms1 \ mesa-common-dev libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons == Optional: Using scons-local instead of installing SCons == If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} == Compiling == To compile VDrift, just use the <code>scons</code> command. scons === Optional: Compile Options === You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 To enable force feedback, use this option: scons force_feedback=1 You can get a list of all compile time options with: scons --help {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} == Installing == VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} === Optional: Installation Location === You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} = Compiling on Mac OS = == Prerequisites == The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.2 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Dependencies== Download the Mac OS X dependancies into ''vdrift/vdrift-mac'' cd vdrift git clone https://github.com/VDrift/vdrift-mac.git == Building == Open ''vdrift/vdrift-mac/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from Xcode's "Build" menu. == Error fixing == If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. = Compiling on Windows = == Prerequisites == * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. == Building with Code::Blocks/MinGW == * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. == Building with MSVC == * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. == Building with Scons(broken) == {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat == Installing VDrift Data == * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:Mac OS X]] [[Category:Operating Systems:Windows]] a15ab7541a84c3176d65b630ec0c5b8f445db847 Packaging on Mac OS X 0 70 856 855 2012-01-20T18:33:52Z Timo 6 3 Better xcode 4 method and more comprehensive instructions. wikitext text/x-wiki This page documents how to package VDrift for release on the Mac OS X operating system. ==Prerequisites== Make sure you have a working build to release - check [[Getting the development version]] and [[Compiling on Mac OS X]]. ==Packaging== In Xcode 4 or higher: * First change the "Bundle versions string, short" in Info.plist from yyyy-mm-dd to the date of the release. * Then click "Edit Scheme..." in the "Product" menu, select the Run item on the left and change "Build Configuration" to Release. * Now build the application and you will get a file named ''vdrift-mac-yyyy-mm-dd.dmg'' in ''build/Release''. Just change the date again and this file can be uploaded to Sourceforge. * Once you've finished remember to reset the version to yyyy-mm-dd in Info.plist and the build configuration to Debug before committing any changes. If you don't have Xcode 4, do the same as above but replace the second step with: * Switch to the "Release" Build style using the popup-menu in the toolbar and hit "Build" from XCode's "Build" menu. [[Category:Development]] [[Category:Operating Systems:Mac OS X]] [[Category:Review]] 19958fb5c69d7f4665dfadcee779dadd63b4a357 Getting VDrift 0 33 491 490 2012-02-08T22:10:37Z Timo 6 3 /* Source Package */ Simplify wikitext text/x-wiki Getting VDrift should follow getting the prerequisites. See [[Software requirements]]. Getting VDrift enables VDrift to be build. See [[Compiling VDrift]]. Getting VDrift consists of getting its two major parts, the source code and the data. Both are described below. = Latest Release = VDrift releases are available on [http://sourceforge.net/projects/vdrift/ SourceForge]. It is recommended that users download the very latest release for their operating system. == Version Numbering == Each release of VDrift has a version number corresponding to the date of release, in the '''YYYY-MM-DD''' format. The latest release will be have the version number closest to the current date. == Operating Systems == Currently, downloadable releases are usually provided for [[:Category:Operating Systems:Linux|Linux]], [[:Category:Operating Systems:Mac OS X|Mac OS X]], and [[:Category:Operating Systems:Windows|Windows]]. The installer package for a given operating system will be marked as such in the SourceForge download system. === Linux === You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. === Source Package === [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift source package and unpack the archive. tar jxvf vdrift-yyyy-mm-dd-src.tar.bz2 === Windows === === Mac OS === = Development Version = VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== VDrift's source on the GitHub web site is at https://github.com/VDrift/vdrift/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an copy of the source code and your platform's dependencies. ===Linux/Unix=== Install a git client (eg. [http://git-scm.com/ Git]). If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: git clone git://github.com/VDrift/vdrift.git vdrift It will download the current development version in the subfolder ''vdrift''. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://code.google.com/p/msysgit/ MSysGit]. After installing it, open Windows Explorer and go to the directory to which you want to download the VDrift source code. Right-click and click Git GUI Here. Select Open Existing Repository. In the next screen you need to fill in the URL of the repository which is git://github.com/VDrift/vdrift.git. Simply click OK, and the source code will be downloaded. Then do the same, but with the URL git://github.com/VDrift/vdrift-win.git and make sure that it downloads in a ''/vdrift-win'' directory in the main vdrift directory. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== First you will need to obtain a git client (eg. [http://mac.github.com/ GitHub for Mac]). Once you have a working Git client open a terminal and navigate to where you wish to download the VDrift source code. Then run the following code: git clone git://github.com/VDrift/vdrift.git vdrift to download the lastest source code to the subfolder ''vdrift''. Then navigate to the ''vdrift'' folder: cd vdrift and download the mac dependencies into the subfolder ''vdrift-mac'': git clone git://github.com/VDrift/vdrift-mac.git vdrift-mac Finally [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ==Checking out the data== The data set is currently only available from the SourceForge SVN (https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data). It needs to be checked out in a ''/data'' directory in the main vdrift directory. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called ''/home/user/vdrift'', you would do this: cd /home/user/vdrift svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. [[Category:Installation]] ab8c50e803c2fdd647bee58aea9e594c75c7179e Getting more cars 0 34 500 499 2012-02-08T22:34:35Z Timo 6 3 Rearrange page. wikitext text/x-wiki <small>[[Getting more cars|English]] - [[Getting more cars/it|Italiano]]</small> A small selection of cars are distributed in the release VDrift packages. This page describes how to get some more. = List of cars = The following cars are in the [[http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. To see pictures of some of the cars visit the [http://cars.vdrift.net cars.vdrift.net] website. {| | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: F1 car (2002) | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 |} = Downloading cars = Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. = Installing cars = Uncompress the .tar.gz file. This should create a folder with the short name of the car containing files like about.txt and body.joe. Move that folder to '''vdrift/data/cars''' folder. Run VDrift and your new car will be ready to drive! = Updating cars = You can update cars from within VDrift itself. Click "Updates" on the main menu, then "Check for updates". If any are available go to the car in the "Manage Cars" section and click "Apply Update". = See also = * [[Getting Tracks]] [[Category:Cars]] 0188c8dd0530615e9c19c783a299a6d3401dc937 Software requirements 0 77 910 909 2012-02-08T22:55:40Z Timo 6 3 /* Libraries */ SDL_net is required, and bullet is no longer bundled. wikitext text/x-wiki {{update}} The following software needs to be installed on a computer for it to run VDrift. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Linux * FreeBSD * Mac OS X * Windows ==Device Drivers== It is advisable to always use the latest version of the device driver for [[Hardware requirements#Graphics Device|graphics cards]]. ==Libraries== Compilation and execution depend on the following libraries: * [http://bulletphysics.org Bullet Physics library] - only the following are required: ** Bullet Collision ** Bullet Dynamics ** Bullet SoftBody ** LinearMath * cURL * [http://glew.sourceforge.net/ GLEW] * [http://xiph.org/ogg/ Ogg] * [http://www.opengl.org/ OpenGL] * [http://www.libsdl.org/ SDL] * [http://www.libsdl.org/projects/SDL_image/ SDL_image] * [http://www.libsdl.org/projects/SDL_net/ SDL_net] * [http://www.ferzkopp.net/joomla/content/view/19/14/ SDL_gfx] * [http://xiph.org/vorbis/ Vorbis] * GLU * [http://think-async.com/ asio] * [http://www.boost.org/doc/libs/release/libs/bind/bind.html Boost] * pthread To [[Compiling|compile]], it is necessary to install the header files for these libraries. On some operating systems, such as Linux and FreeBSD, these libraries must be installed on the system first before VDrift will run. On Mac OS X and Windows, all the necessary library files are packaged with VDrift. ==Build Tools== To compile VDrift, you'll also need * [http://gcc.gnu.org/ GNU C++ compiler] (version 3.2 or greater) * [http://www.scons.org/ SCons] Other build tools are sometimes required, and alternative build options are sometimes available, depending on the target operating system (see [[Compiling]] for details). [[Category:Installation]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] [[Category:Review]] 4f9de723114d24dd491accdfc8b5d3de05387c8e 911 910 2012-02-18T13:38:59Z Timo 6 3 /* Libraries */ wikitext text/x-wiki {{update}} The following software needs to be installed on a computer for it to run VDrift. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Linux * FreeBSD * Mac OS X * Windows ==Device Drivers== It is advisable to always use the latest version of the device driver for [[Hardware requirements#Graphics Device|graphics cards]]. ==Libraries== Compilation and execution depend on the following libraries: * [http://bulletphysics.org Bullet Physics library] - only the following are required: ** Bullet Collision ** Bullet Dynamics ** Bullet SoftBody ** LinearMath * cURL * [http://glew.sourceforge.net/ GLEW] * [http://xiph.org/ogg/ Ogg] * [http://www.opengl.org/ OpenGL] * [http://www.libsdl.org/ SDL] * [http://www.libsdl.org/projects/SDL_image/ SDL_image] * [http://www.ferzkopp.net/joomla/content/view/19/14/ SDL_gfx] * [http://xiph.org/vorbis/ Vorbis] * GLU * [http://think-async.com/ asio] * [http://www.boost.org/doc/libs/release/libs/bind/bind.html Boost] * pthread To [[Compiling|compile]], it is necessary to install the header files for these libraries. On some operating systems, such as Linux and FreeBSD, these libraries must be installed on the system first before VDrift will run. On Mac OS X and Windows, all the necessary library files are packaged with VDrift. ==Build Tools== To compile VDrift, you'll also need * [http://gcc.gnu.org/ GNU C++ compiler] (version 3.2 or greater) * [http://www.scons.org/ SCons] Other build tools are sometimes required, and alternative build options are sometimes available, depending on the target operating system (see [[Compiling]] for details). [[Category:Installation]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] [[Category:Review]] 94c79cb648b1456d84b5f5c26b2e9bdc537c2c48 Wiki usage notes 0 89 1050 1049 2012-02-09T19:17:42Z Timo 6 3 Spam wikitext text/x-wiki This article intends to give an idea of how to get the most out of this wiki site. ==Write!== The success of a site like this depends on its contributors. If you see a mistake, no matter how small, edit the article and fix it. If you know that something is missing, please write about it, and if you don't know enough put something in the article reminding others to add this information. ==Discussion pages== Each article has a discussion page. Use this page to ask questions or suggest changes to a page. For instance, if you're not sure if something is right or not, and want to make sure before editing yourself, the discussion page is ideal. Likewise if there is something missing from a page that you don't know much about, the discussion page is a good place to put in the request. Don't hesitate to use these, and don't forget to sign your username. ==New articles== If you'd like to create a new article and aren't sure where to put it, just give it a general name. We can always move or reorganize pages later. It's better to get the information down and worry about the details later. When adding a new article, put something in the notes telling where you got the information (for instance if you copied it from somewhere else). ==Editing articles== When possible, edit only the section that you'd like to change, rather than the whole article. This makes it less likely for two authors to be editing the same page at the same time. This also makes changes more atomic, and the section name is automatically added to the article editing summary, which makes it easier to see what part of the article was changed. On the topic of summaries, please try to remember to add a summary whenever editing an article. It is somewhat annoying to have to check the diffs every time someone makes an edit. Just a few words will do, like "fixed spelling of 'pulchritudinous'" or "restructured for better flow". To help keep the notes simple, its best to also keep the edits simple. Don't try to totally rewrite an article in one edit, unless it's very short. If there's a logical way to break up the edits do so. ==General tips== ===Notes=== If there's something you'd like to draw the reader's attention to, you can use the note template. Here's an example of how to use it: <nowiki>{{note|Notes are hard to miss}}</nowiki> This is what it will look like: {{note|Notes are hard to miss.}} ===Sections=== Articles can be split into sections with sub-sections. The wiki generates a nice table of contents by the sections. To make a top-level section, put the section name between a set of double equal signs, like this: ==Overview== A section of this would have one more equal sign on each side: ===Sub-section 1=== There may be sub-sub sections, and sub-sub-sub sections, and so on. Don't get too carried away... ===Links=== The wiki generates links automatically in many cases. To link to something on an external site, use single brackets, with the URL first, followed by the link text, like this: <nowiki>[http://vdrift.net/ VDrift]</nowiki> To put a raw URL in an article, simply insert it without any brackets, it will automatically be turned into a link. To make internal links, simply put the page's name in double square brackets. You don't have to put in any underscores as are added to the URL of the page. Here's a link to this page: <nowiki>[[Wiki usage notes]]</nowiki> To give a link of this nature a different link text, add a pipe character ("|") after the page name, and then put the link text: <nowiki>[[Wiki usage notes|Notes on using the wiki]]</nowiki> ===Unwritten pages=== If there's a topic that really deserves its own article, but there is no information on the wiki about it yet, just add a link to the article where it should go. This will encourage others to write the page. <nowiki>We really need a [[Car modeling tutorial]].</nowiki> ===Code blocks=== The wiki makes it very simple to add blocks of pre-formatted text. Simply add a space before the lines which should be part of the code block. ===Talking about files=== When referencing file or directory names, it is important to set them apart from the other text so that the reader doesn't confuse sentence punctuation and other words with the directory or file name. The best way to address this is to make the text bold, by adding three apostrophes before and after the text: <nowiki>VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''.</nowiki> ==Nevertheless== If you feel like you don't understand the above guidelines, don't worry about them too much. Go ahead and write your article or fix another, someone will probably clean it up later if there are mistakes or areas for improvement. [[Category:Documenting]] [[Category:Review]] 02c6c2e7fbfa868d6ebab3c59d6f1d2c32f9629b Main Page 0 1 1 2012-08-26T03:30:02Z MediaWiki default 0 wikitext text/x-wiki '''MediaWiki has been successfully installed.''' Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software. == Getting started == * [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list] * [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ] * [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list] 25b5c21bea6319ae81e1379d4e59bdfe9100ce36 2008 Refactor Project 0 2 11 10 2012-08-26T17:18:31Z Timo 6 3 9 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==Overview== Hacking on VDrift was getting harder and harder. Each new feature that was added required more work and made it that much more difficult to add the next feature. So, a major code refactor/rewrite was begun in April 2008. One side effect of this effort was that any new bugs or feature suggestions were put in the issues system as future "to do" items. ==Status== The refactor was deemed "complete enough" and moved into the trunk on 10/21/08! The old trunk code was moved to: http://svn.vdrift.net/repos/vdrift/tags/oldtrunk [[Category:Historical]] 9b90be6023500d32e8483b6d731e6b0caf1bdd7f 3D modeling 0 3 23 22 2012-08-26T17:18:32Z Timo 6 3 11 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==Blender== [http://blender.org/ Blender] is the best 3D modeling application to use for creating cars, tracks, and related 3D game art for VDrift. ===General Use=== * [http://wiki.blender.org/ Blender Wiki] - All the official Blender documentation, including the [http://wiki.blender.org/index.php/Doc:Manual User's Manual]. * [http://blenderunderground.com/video-tutorials/ BlenderUnderground Blender Video Tutorials] - The Blender Basics series seeks to provide a way for those new to Blender, or those new to 3D graphics in general, to begin to master this powerful and capable application. * [http://www.blenderart.org/issues/ BlenderArt Magazine] - A magazine dedicated to Blender. ===Modeling Cars=== * [http://www.blendernation.com/2006/04/15/tutorial-modeling-a-toyota-celica/ BlenderNation Tutorial: Modeling a Toyota Celica] - If you want to learn how to model a car from reference pictures, then check out this tutorial. It covers techniques such as loading bitmaps in the 3D viewports, tracing them, mesh extrusion, normal correction and using subdivision surfaces. Aimed at intermediate level Blender users. * [http://issuu.com/blenderart_magazine/docs/blenderart_mag-8_eng BlenderArt Magazine, Issue 8: Car Modeling] - An entire magazine issue about modeling cars. ===Modeling Tracks=== * [http://supertuxkart.sourceforge.net/Blender_track_modelling_tutorial Super TuxKart Track Modeling Tutorial] - A little guide on how to build tracks with Blender and how to avoid common pitfalls. Some basic Blender knowledge is assumed. [[Category:Cars]] [[Category:Tracks]] [[Category:External Resources]] [[Category:Expand]] 21b1e0c30f2375de2dd5acc208cbdde69769520d Adding video modes 0 5 40 39 2012-08-26T17:18:33Z Timo 6 3 3 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} You can add a new resolution to the list that gets displayed in the in-game display options by editing the '''data/lists/videomodes''' file. When VDrift is run, it reads this file for the base list of video modes. Then it gets a list of available graphics modes that your monitor supports using SDL. During this process it checks the provided modes to see if they are valid (invalid modes are removed from the list). The list of video modes which is then made available through the Display Options menu is all working modes from the videomodes file plus any other modes SDL reported as working. [[Category:Files]] [[Category:Update]] cacb1f690dfdb844b7b693df28a3a3650afc8373 Authors and contributors 0 6 66 65 2012-08-26T17:18:36Z Timo 6 3 25 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page, or post in the forums.}} ==Authors== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] who continues to fix bugs in the game, as well as writing new subsystems and maintaining old ones. Joe created everything in VDrift which is not attributed to someone else below. The physics engine in the game was originally [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. As time went on it underwent many modifications. Now, the physics system has been rewritten. ==Current Contributors== ===Code=== * [http://vdrift.net/users.php?mode=profile&uid=5379 NaN] has rewritten the physics code, added car color selection, implemented multi-language menus, and continues to fix bugs and add new features. * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, much of the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. Chris is currently working on a driver training system with evaluation of driving behavior and driver feedback. * [http://vdrift.net/users.php?mode=profile&uid=1435 Francis Whittle] has improved the car suspension by adding new types of suspension. * [http://vdrift.net/users.php?mode=profile&uid=5534 Antonio Caiazzo] is working on a new AI system based on neural networks. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Tracks==== * [http://vdrift.net/users.php?mode=profile&uid=412 alex25] has imported most of the tracks from various sources, and helped maintain them over time. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=1337 Ny Dedes] TC6, LE, and is working on a new car, the ATT. also modeled the driver, and coded the mesh generation for tires and brake rotors. * [http://vdrift.net/users.php?mode=profile&uid=3407 Timothy Porter] is working on preparing freely-licensed car models for import, and polishing the track Rouen. ===Ports=== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] maintains the VDrift port for Mac OS X. * [http://vdrift.net/users.php?mode=profile&uid=2522 Timothy Furlong] helps maintain the VDrift port for Mac OS X and has helped to update and expand wiki pages. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] maintains the VDrift port for FreeBSD. ===Documentation=== * [http://vdrift.net/users.php?mode=profile&uid=2522 Timothy Furlong] has helped to update and expand wiki pages. ==Former Contributors== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * [http://vdrift.net/users.php?mode=profile&uid=755 rookie1] wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=5095 MirceaKitsune] contributed new skins for several cars, and several patches including adding reverse lights, sounds for gear, brake and handbrake, and a new car coloring implementation with adapted skins. * [http://vdrift.net/users.php?mode=profile&uid=710 cotharyus] improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helped with testing and debugging, worked on Debian GNU/Linux packaging, and improved the build system. * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] packaged VDrift for Slackware Linux and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=1356 Gonéri Le Bouder] worked on Debian GNU/Linux packaging and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] managed the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added the first version of internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. * [http://vdrift.net/users.php?mode=profile&uid=769 pwp71] helped maintain track data when new features became available. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 Tyler Fric] created the 360. [[Category:General Info]] 8ebfdde7e899ea803b28ce30ed9be6a47aced2ef Autoupdate 0 7 70 69 2012-08-26T17:18:37Z Timo 6 3 3 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki This page describes, at a high level, how the auto-update function works. ==Introduction== One major barrier to releasing more often is the huge size of the VDrift releases. These large sizes are due to the large number of cars and tracks that are typically included in a release. If VDrift has auto-update functionality, then releases can be very minimal (one track and one car, for example) and people can download new cars and tracks (and keep their existing ones up to date) through an in-game interface. The rest of this document talks exclusively about updating cars, but tracks should work similarly. The auto-update functionality was first proposed in this forum post: http://vdrift.net/Forum/viewtopic.php?p=12999 ==User Interface== Several GUI pages have been added. From the main menu, the "Cars and Tracks" button takes the user to a page with options to check for updates and manage cars. When the user clicks "check for updates", the sourceforge svn browser html is scraped to get the latest revision numbers for the car folders. The car manager UI is populated from code and allows the user to see what updates are available and provides an "apply update" button. ==Versioning== There are two types of versioning: the versioning for each car folder, and the versioning for the car format. First, car folder versioning. The data/settings/updates.config file is distributed with each release, and contains the cars that have been included in that release along with their SVN revision numbers. When the game checks for updates, the sourceforge svn browser html is scraped to get the latest revision numbers, and that information ([available_cars] section) along with the current on-disk versions ([cars] section) are stored in an updates.config in the user's folder (~/.vdrift on linux). The game offers to apply updates when the on-disk versions are less than the available versions. Next, car format versioning. Sometimes, the format of car files changes in a way that breaks compatibility with old data files. To protect against updating cars to a format that the user's executables won't understand, format versions are stored in the updates.config file in the [formats] section. The version of the car format that the executable release understands is set in the data/settings/updates.config file included in the release (and copied to the user's folder). The game retrieves the latest data/settings/update.config via the sourceforge svn website and checks the format version there to make sure it matches the version number in the local update.config. If the format versions are not equal, updates will refuse to apply. ==Updating== When the user clicks "apply update", the car format versioning is re-checked per the description above. If the car format versions mismatch, the game refuses to continue. Otherwise, updates are applied by fetching the .tar.gz bundle for a car's folder from sourceforge's http svn browser to a temporary folder (~/.vdrift/tmp on linux). This file then decompressed using libarchive into the settings directory (~/.vdrift on linux) under a "cars" subdir. The game should look here first when loading car files, and fall back to the global data path. The downloaded file is deleted once the update completes successfully, otherwise it leaves the temporary file around for troubleshooting. [[Category:Development]] 146c1a435a5a403dee201faa6b563d8d782df067 Car modeling tutorial 0 8 72 71 2012-08-26T17:18:37Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[3D modeling for game data]] 61cadf5dc3c605951325e0254b7f32bb4143451a Car parameters 0 9 127 126 2012-08-26T17:18:49Z Timo 6 3 54 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] [[Category:Update]] b94fab9c68992442d19898d1af7cc79070c4005a Car parameters(old) 0 10 129 128 2012-08-26T17:18:49Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Car parameters for vdrift-2009-06-15 and older]] e7b5d5a7a49f0d1828b5a43297c3b109d0133a1b Car parameters for vdrift-2009-06-15 and older 0 11 171 170 2012-08-26T17:18:57Z Timo 6 3 41 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. [[Category:Historical]] d915b9d3ffeec5b1be2162a04815433be9a1999c Car parameters for vdrift-2010-06-30 0 12 192 191 2012-08-26T17:19:01Z Timo 6 3 20 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Update]] 1e928797480de45ff82d41283e61e687a49487eb Coding guidelines 0 13 205 204 2012-08-26T17:19:03Z Timo 6 3 12 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not overuse comments. Only comment code which has side effects, is not clear at first glance, or includes complex operations. It is OK to comment a section of code with a description of what that section does. It is a good idea to comment most non-trivial classes, methods, and instance variables. When commenting code, keep in mind that using [http://doxygen.org/ Doxygen] style comments will help to generate better documenation. See [[Source Code Documentation]] for more information. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, the CAR should contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if there is a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should ''not'' know anything about the SETTINGS module and should not access it. The advantage is that now the RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If the SETTINGS subsystem is later rewritten, it doesn't (and shouldn't ever) cause any changes to code in the RENDERER. The RENDERER is now decoupled from the SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. ==Testing== Unit testing is encouraged. VDrift comes with the [http://quicktest.sourceforge.net QuickTest] unit testing framework. To use, simply #include "unittest.h" in your source code implementation files. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} [[Category:Development]] [[Category:Documenting]] [[Category:Expand]] f736d9b47a827e7314ee41a74f472b07b87b26c7 Community 0 14 214 213 2012-08-26T17:19:04Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Useful links]] eb9138313120c16a43bcb2113ebdaf7bd14976cc Compiling 0 15 216 215 2012-08-26T17:19:04Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Compiling VDrift]] c7c439c195edfbbd33ee53a15a7ca3ffcf2f8445 Compiling VDrift 0 16 324 323 2012-08-26T17:21:20Z Timo 6 3 79 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Compiling VDrift depends upon the build environment beeing set up correctly. See [[Getting VDrift]]. Compiling VDrift makes it possible to [[Installing|Installing VDrift]]. Compiling VDrift is different depending on the operating system on which it is compiled. So follow the applicable passage. = Compiling on FreeBSD = To compile VDrift on FreeBSD, use the ports system. == Latest Release == If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends == Development Version == If you Downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends = Compiling on Linux = == Prerequisites == The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. === Bullet === For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update === LibGLEW === {{note|VDrift requires libglew version greater than 1.5.3.}} Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb === Ubuntu 8.04 === For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev === SCons === As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. === All other Packages === All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libarchive-dev libasio-dev \ libboost-dev libcurl4-gnutls-dev libdrm-dev \ libgl1-mesa-dev libglu1-mesa-dev libkms1 \ mesa-common-dev libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons == Optional: Using scons-local instead of installing SCons == If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} == Compiling == To compile VDrift, just use the <code>scons</code> command. scons === Optional: Compile Options === You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 To enable force feedback, use this option: scons force_feedback=1 You can get a list of all compile time options with: scons --help {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} == Installing == VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} === Optional: Installation Location === You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} = Compiling on Mac OS = == Prerequisites == The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.2 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Dependencies== Download the Mac OS X dependancies into ''vdrift/vdrift-mac'' cd vdrift git clone https://github.com/VDrift/vdrift-mac.git == Building == Open ''vdrift/vdrift-mac/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from Xcode's "Build" menu. == Error fixing == If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. = Compiling on Windows = == Prerequisites == * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. == Building with Code::Blocks/MinGW == * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. == Building with MSVC == * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. == Building with Scons(broken) == {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat == Installing VDrift Data == * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:Mac OS X]] [[Category:Operating Systems:Windows]] a15ab7541a84c3176d65b630ec0c5b8f445db847 Compiling on Mac OS X 0 17 326 325 2012-08-26T17:21:20Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Old Method of Compiling on Mac OS X]] 6719f7c0e9689a24b40fb84a8f51e845c71fbe22 Compiling on Windows 0 18 328 327 2012-08-26T17:21:20Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Old Method of Compiling on Windows]] 22b377ad05a0f4aaadad4c9822add42aebfa36c4 Configfile format 0 19 339 338 2012-08-26T17:21:22Z Timo 6 3 10 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Many of VDrift's text-based data and configuration files are written in a format native to the game. The format is designed to be simple and easy to read, while flexibly storing many different kinds of data. It allows settings to be categorized into sections. This format is defined by the '''CONFIG''' class in '''include/config.h''' and '''src/config.cpp'''. ==Features== ===Encoding=== Files in this format are interpreted as plain ASCII text. UTF-8 is not yet supported. ===Include directives=== Lines that start with '''include''' will load sections and settings from another file written in the format. The file may be named using a relative path, which follows the '''include''' keyword and a single space. If the same section exists in both files, a union of the two sections will result in the file which had the include directive. Values from the including file override those in the included file. Circular includes are repressed. ===Comments and Whitespace=== Comments begin with '''#''' and can occur at any point in a line. Everything following the '''#''' is ignored until the end of the line. Whitespace before and after an identifier, name, or value is ignored; however, all spaces are preserved inside both section and setting identifiers. Line breaks are significant -- each line may contain only one section heading, '''include''' directive, or setting. ===Sections=== Sections (categories) are defined by a heading line with an identifier only. The section identifier may be placed between optional '''[''' and ''']''' brackets. Identifiers are case-sensitive. Sections are categorical (flat), not hierarchical (nested). It is possible to create a category hierarchy by carefully naming each section, but the format does not provide any mechanism for managing or traversing a hierarchy. Settings included in a section are all those on lines following the section heading, until the next section heading or the end of the file. ===Settings=== Settings (data items) are defined by a line with the form '''''name'' = ''value''''', where ''name'' is the identifier for the setting and ''value'' is the data for the setting. No restrictions are placed on the type, length, or formatting of the value stored in a setting. Setting identifiers are case-sensitive. Settings before the first section heading have no section. They are referenced by their identifiers preceded by a '''.''' character. ====Value types==== The format employs a somewhat loose typing scheme. Settings do not need to have their types explicitly defined. In the game code, an item can be queried as any type, and depending on the value of the item, certain values can be interpreted differently when requested as different types. Values can be requested as any of the following: * booleans * integer numbers * floating point numbers * strings * lists For instance, the item '''2nd.now''' from the example above would have the value ''1'' if interpreted as an integer. If interpreted as a boolean, its value would be ''true''; as a string, its value would be ''"1"''; as a floating-point number, its value would be ''1.0''. ====Booleans==== The following values will equal ''true'' and ''false'', respectively, when interpreted as boolean values: * '''true''', '''false''' * '''yes''', '''no''' * '''on''', '''off''' * '''1''', '''0''' ====Lists==== List settings may be defined by writing a list of values separated by commas instead of just a single value. ==Example== A file in this format might look like this. name = Example [ first ] stuff = 567 blah = hello radius = 0.555 [ 2nd ] beans = on now = 1 position = 5,6,7 In the file, there are two categories, each with three data items. These items would be referenced by the following identifier strings, respectively: * '''.name''' * '''first.stuff''' * '''first.blah''' * '''first.radius''' * '''2nd.beans''' * '''2nd.now''' * '''2nd.position''' [[Category:Files]] [[Category:Expand]] da25b78dcf3caf72b960c823479c4ab83b09da76 Configuring the controls 0 20 348 347 2012-08-26T17:21:24Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} VDrift aims to be very user input friendly, and thus there are many different ways to adjust the controls in the game to fit each user's needs. There are options which affect all the controls, options which affect only a certain type of controls, and options that affect each individual control assignment. ==Features== * Any input method can be used to navigate the menu. * Joysticks can be used by calibrating them in the '''Options -> Controls -> Joystick -> Calibrate''' menu. * Any input can be assigned to any control. * Gas, brake, and steering controls only allow a single setting. All other controls can have any number of settings on any types of input devices. ==Control options== Control options are defined in the text configuration file [[options.config]], set in the '''Options -> Controls''' menu and its submenus, and stored in the text configuration file [[VDrift.config]]. ===AutoClutch=== * type: boolean * setting: control.autoclutch * values: on, off Enable/disable automatic clutching (prevents car from stalling). Simulates the driver pressing the clutch in using foot when RPM gets close to the stall point. ===AutoShift=== * type: boolean * setting: control.autotrans * values: on, off Enable/disable automatic transmission shifting. ===Button Control Delay=== * type: float * setting: control.button_ramp * values: off (0.0), long (5.0), medium (7.5), short (10.0) Slow down application of button inputs on analog controls. ===Speed Affect on Steering=== * type: float * setting: control.speed_sens_steering * values: range 0.0 to 1.0 The higher the value on this setting, the more steering is limited as car speed increases. ===Joystick Type=== * type: string * setting: joystick.type * values: "joystick", "wheel" Change the type of joystick device. ===Force Feedback Device=== * type: string * setting: joystick.ff_device * values: something like "/dev/input/eventX" Device file for force feedback events. For more detail, see [[Setting up force feedback]]. ===Force Feedback Gain=== * type: float * setting: joystick.ff_gain * values: range 0.5 to 5.0 Multiplier to adjust strength of force feedback. ===Invert Force=== * type: boolean * setting: joystick.ff_invert * values: on, off Reverse the force feedback, if necessary for your wheel. ===200 Degree Wheel=== * type: boolean * setting: joystick.two_hundred * values: on, off Limit steering range to 200 degrees, gives a realistic feel to limited range wheels. ==Assigning controls== Control assignments can be configured through the submenus of the '''Options -> Controls -> Assign Controls''' menu, and stored in the text configuration file [[controls]]. Control assignments can be edited after they are set. There are two basic types of control, analog and digital. Analog controls include joystick axes and mouse motion, while digital controls are keys, mouse buttons and joystick buttons. Any type of input can be assigned to any type of control. So, for example, a digital control - like a key - can be assigned to an analog control. If the "Button Control Delay" option is something other than 0.0, then the key will behave just like a true analog control. ===Car Controls=== =====Gas===== * control name: gas The gas control causes the car to speed up. =====Brake===== * control name: brake The brake control causes the car to slow down. =====Steer Left===== * control name: steer_left The steer left control causes the car to turn left. =====Steer Right===== * control name: steer_right The steer right control causes the car to turn right. =====Start Engine===== * control name: start_engine The start engine control will restart the engine if it stalls. {{note|The engine will not start unless the car's transmission is in neutral.}} =====Handbrake===== * control name: handbrake The handbrake brakes only on the back wheels. =====ABS Toggle===== * control name: abs_toggle The ABS Toggle turns anti-lock braking on or off while playing. =====TCS Toggle===== * control name: tcs_toggle The TCS Toggle turns traction control on or off while playing. ====Transmission==== =====Shift Up===== * control name: disengage_shift_up The shift up control changes the car's gear to the next one. =====Shift Down===== * control name: disengage_shift_down The shift down control changes the car's gear to the previous one. =====Engage Clutch===== * control name: engage The engage clutch control lets out the clutch. This must be done after every shift. =====Analog Clutch===== * control name: clutch The analog clutch control can allow you to use an external clutch pedal. ====Gears==== =====Neutral===== * control name: neutral The neutral control shifts the car into neutral. =====1st===== * control name: first_gear The first gear control shifts the car into first gear. =====2nd===== * control name: second_gear The second gear control shifts the car into second gear. =====3rd===== * control name: third_gear The third gear control shifts the car into third gear. =====4th===== * control name: fourth_gear The fourth gear control shifts the car into fourth gear. =====5th===== * control name: fifth_gear The fifth gear control shifts the car into fifth gear. =====6th===== * control name: sixth_gear The sixth gear control shifts the car into sixth gear. =====Reverse===== * control name: reverse The reverse control puts the car into reverse gear. ===Game Controls=== =====Pause===== * control name: pause The pause control freezes the game (except in multiplayer). ====Camera Views==== =====Previous Camera===== * control name: view_prev_camera This moves to the previous camera in the set (hood, in-car, chase rigid, chase loose). =====Next Camera===== * control name: view_next_camera This moves to the next camera in the set (hood, in-car, chase rigid, chase loose). =====Hood===== * control name: view_hood The hood camera control moves the camera to the car's hood. =====In-Car===== * control name: view_incar The in-car camera control moves the camera to driver's view. =====Chase (Rigid)===== * control name: view_chaserigid The rigid chase camera control moves the camera to a fixed distance behind the car. =====Chase (Loose)===== * control name: view_chase The loose chase camera control moves the camera to follow the car like a helicopter. =====Orbit===== * control name: view_orbit The orbit camera control swings around the car [[Configuring the controls#Camera_Movement|as the camera moves]]. =====Free===== * control name: view_free The free camera control can be moved anywhere using the arrow keys. =====Focus Next===== * control name: focus_next_car Changes the camera to focus on the next car. =====Focus Previous===== * control name: focus_prev_car Changes the camera to focus on the previous car. ====Camera Movement==== =====Pan Left===== * control name: pan_left Turn the camera view to the left. =====Pan Right===== * control name: pan_right Turn the camera view to the right. =====Pan Up===== * control name: pan_up Turn the camera view upwards. =====Pan Down===== * control name: pan_down Turn the camera view downwards. =====Zoom In===== * control name: zoom_in Zoom camera in. =====Zoom Out===== * control name: zoom_out Zoom camera out. ====Replays==== =====Skip Forward===== * control name: replay_ff The skip forward control skips ahead ten seconds during a replay. =====Skip Backward===== * control name: replay_rw The skip backward control goes back ten seconds during a replay. ====Tools==== =====Screen Shot===== * control name: screen_shot The screen shot control saves a snapshot of the game while playing. =====Joystick Info===== * control name: joystick_info The joystick info control shows debugging info for available joysticks. ==Editing Controls== After controls have been assigned they can be edited to change some properties of the control. To edit a control just click on it in one of the control assignment menus. ===Analog control properties=== Analog controls include joystick axes and mouse motion. These have options for deadzone, gain and exponent. ====Deadzone==== Deadzone allows motion under a certain threshold percentage to be ignored. This is useful if you use a joystick which "wobbles" around the center. You may see the brake lights come on when you let go of the gas, or the car is hard to keep going straight, deadzone will help to fix these things. ====Gain==== Gain multiplies the input value by a percentage. This will make the input value increase linearly. ====Exponent==== Exponent raises the input value on an exponential curve. This helps give more fine-tuning of controls such as steering around the center but still allows for making sharp turns if needed. ===Digital control properties=== ====Up/Down==== This controls whether the action will be triggered when the button/key is pressed (down), or released (up). ====Held/Once==== This should be set to "held" when they a digital input is mapped to an analog control, like when using keys for gas, brake or steering. This is set automatically when the control is assigned. ==Deleting controls== There is a Delete button on each Control Editing screen, so to delete a control just click on it, then click Delete. [[Category:Configuration]] [[Category:Update]] 320f71456a45f4959638dd21936c76aad460db4a Configuring the display 0 21 357 356 2012-08-26T17:21:26Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} Configuring the display is done by editing [[VDrift.config]] manually, or by changing the settings in the '''Options -> Display''' and '''Options -> Display -> Advanced''' menus. ==Display Options== ===Resolution=== * type: integer pair * settings: display.width, display.height * values: depends on the file '''vdrift/data/lists/videomodes''' and the resolutions your video card makes available Change the resolution of the game display. See [[Adding video modes]] for how to make new video modes available to choose from. ===Fullscreen=== * type: boolean * setting: display.fullscreen * values: on, off Make the game take up the entire screen. ===Speed Units=== * type: boolean * setting: display.mph * values: on = "MPH", off = "km/h" Change the units that speed is displayed in. ===Framerate Counter=== * type: boolean * setting: display.show_fps * values: on, off Enable/disable the framerate counter. ===Heads Up Display=== * type: boolean * setting: display.show_hud * values: on, off Enable/disable the heads up display. ===Menu Skin=== * type: string * setting: display.skin * values: default "simple", the name of any directory in '''vdrift/data/skins/''' Change the graphics and layout of the VDrift menus. ===Input Graph=== * type: boolean * setting: display.input_graph * values: on, off Visualize the steering and acceleration/braking on screen. ==Advanced Display Options== ===Color Depth=== * type: integer * setting: display.depth * values: 16, 32 Adjust the amount of colors available. ===Texture Size=== * type: string * setting: display.texture_size * values: "small", "medium", "large" Change the size of the textures displayed. ===View Distance=== * type: floating-point * setting: display.view_distance * values: any positive decimal number of meters Change the maximum view distance. ===Anisotropic Filtering=== * type: integer * setting: display.anisotropic * values: depends on your video card Set anisotropic filtering level for textures. ===Antialiasing=== * type: integer * setting: display.antialiasing * values: depends on your video card Set the full scene antialiasing level. ===Car Shadows=== * type: boolean * setting: display.car_shadows * values: on, off Draw simple static shadows beneath the cars. ===Field of View=== * type: floating-point * setting: display.FOV * values: any positive decimal number Field of view angle in the vertical direction. ===Lighting Quality=== * type: integer * setting: display.lighting * values: 0, 1 Set how good the lighting looks during gameplay. 0 is Low, which is totally static lighting. 1 is Medium, static cube-mapped lighting. ===Reflection Quality=== * type: integer * setting: display.reflections * values: 0, 1, 2 Set how good the reflections look during gameplay. 0 is Low, static sphere-mapped reflections. 1 is Medium, static cube-mapped reflections, and 2 is High, dynamic cube-mapped reflections. [[Category:Configuration]] [[Category:Update]] de768dfc84067e6f584d4373f3c9a6cd9d2167be Configuring the sound 0 22 365 364 2012-08-26T17:21:27Z Timo 6 3 7 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} Currently VDrift has 3D sound using OpenAL. In-game sounds include engine RPM sound and tire sounds. The game doesn't have any music yet. ==Sound settings== Configuring the sound is done by editing [[VDrift.config]] manually, or by changing the settings in the Options -> Sounds menu. As there is no game music yet, the only option is the volume of game sounds: [sound] volume = 1 {{note|The following sections refer mostly to the Linux version of VDrift.}} ==Troubleshooting sound== If the engine sound is very broken or choppy sounding, and you hear some noise or crackling, you need to tell OpenAL to try to use a different sound backend. If you don't have an ~/.openalrc file, create it with these contents, or modify your current one to look like this: (define devices '(native alsa sdl arts esd null)) (define alsa-device "dsp0") (define speaker-num 2) ;(define sampling-rate 22050) The important line here is the "define devices" line, OpenAL attempts to use each of those sound output methods in order. It uses the first one that works; in some cases native will work best, in other cases perhaps alsa. If Gnome is running its sound daemon, esd would be the best choice, while KDE usually uses artsd. ==Known bugs== If you don't hear lots of crackling and choppiness, but you still hear a 'click, click, click' sound as the engine sample loops, this is a bug in OpenAL for Linux (or a feature we haven't found a way around...). We've heard there is a fix in the works from the OpenAL project. Also, certain cars have engines that rev very high, and our engine sound system can't pitch shift high enough to play the sound at the correct frequency, after it hits the maximum pitch. This is currently only obvious on the F1 car. ==OpenAL Utility Toolkit== On older versions of OpenAL, ALUT was part of the OpenAL library. At some point not easily markable with a version number, ALUT became a separate library. This changed the way VDrift must be built, as well as some of the sound code. To accomodate users of the old version of OpenAL with ALUT included, there is a switch in the SCons build system used on Linux and FreeBSD. To compile VDrift with "old OpenAL" support, simply add the option to the scons compile command: scons old_openal=1 For more information on the build system see [[Using SCons]]. [[Category:Configuration]] [[Category:Update]] c4693f1c4e44c60d81a6883a96bb7319301448e2 Contribution 0 23 374 373 2012-08-26T17:21:28Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==How you can help== We can always use help with: * Testing & bug reports * Feedback and feature ideas * Documentation * Packaging * Game data (cars & tracks) * Other game art (splash screens, menu graphics, sounds) * Promotion * Web site * User support * Coding new features If you want to get started helping us out, the best way is to post on the [http://vdrift.net/Forum/index.php forums], join our [http://vdrift.net/staticpages/index.php/irc-chat IRC channel] and chat with the other developers, or just start developing by forking the [https://github.com/VDrift/vdrift github repository]! If you submit good changes, we might merge your pull request so everyone else can use them. ==Reporting bugs, requesting features== You can post in our [http://vdrift.net/Forum/index.php forums], under [http://vdrift.net/Forum/index.php?forum=3 Bugs] or [http://vdrift.net/Forum/index.php?forum=2 Feature Requests] or in the GitHub issues section: https://github.com/VDrift/vdrift/issues. ===Search!=== Please [http://vdrift.net/Forum/search.php search the forums] before beginning a new topic, as some bugs may already have been already identified, and many features have been requested multiple times. ===Bug reporting guidelines=== Generally we will need to know the operating system, type of machine (32-bit or 64-bit is very important), amount of memory, type of video card (plus amount of video RAM), and version of the game you are running. Sometimes it may help to know which versions of SDL and other libraries VDrift uses are on your system (Linux/FreeBSD). It also helps to know what options you're using in the game. If your problem is related to driving, please include in your report the input device you use and other control options. Likewise if you're having display issues it's helpful to know what display settings you're using. A good way to tell us about your configuration is to include in your report your [[VDrift.config]] file, or at least the sections of it relavent to the problem. ===Tips=== * When you start your topic make sure to give it a meaningful title, like "Crash when changing display properties on Windows64". * If you can provide a "use-case" or series of steps that you took in the game that will help to reproduce the bug, this will greatly increase the chances that it will be fixed. ==Submitting a patch== When posting a patch in the forums, please make sure you surround the content of your patch with the <b>[code]</b> and <b>[/code]</b> tags. This ensures it will be formatted properly. Also, be sure to preview your post before submitting it, and check it for errors. You may need to check in the "disable smileys" checkbox to make sure that some of your code is not changed into happy-faces. Patches should be made with [http://www.gnu.org/software/diffutils/diffutils.html diff] against the latest [[Getting the development version|development version]] of VDrift. If you don't know how to make a patch, try [http://www.google.com/search?q=how+to+make+a+patch+diff googling]. You can also submit a pull request if you have forked VDrift on [https://github.com/VDrift/vdrift GitHub]. See [[Getting the development version#Working with the repository|Getting the development version]]. [[Category:General Info]] [[Category:Review]] 6594c9047f894880847a79a4c23c1f665801d732 Coordinate systems 0 24 384 383 2012-08-26T17:21:29Z Timo 6 3 9 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki The positions and dimensions used in the VDrift .car files are expressed as a triplet of floating-point numbers on a 3-dimensional Cartesian graph. See [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#Cartesian_coordinates_in_three_dimensions Wikipedia: Cartesian coordinates in three dimensions] for more information. {{note|All directions mentioned on this page (left, up, forward, etc.) are relative to the driver of the car.}} ==Car coordinates== Currently, the .car files use the following coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up This is known as a [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system. This coordinate system matches the one used in [http://blender.org Blender]. To use this coordinate system, specify <code>version = 2</code> in the [[Car parameters|'''.car''' file]]. ===Deprecated system=== Previous to revision 2196 of the [[Getting the development version|development version]], the '''.car''' files all used mixed coordinate systems (<code>version = 1</code>). ====Mass Position==== This is the same the Blender coordinate system (described above). ====Wheel and Driver View Positions==== * '''x axis''': negative is back, positive is forward * '''y axis''': negative is right, positive is left * '''z axis''': negative is down, positive is up [[Category:Cars]] [[Category:Tracks]] [[Category:Historical]] 64b395b62149ea237927264b1c447c121713ce19 Creating cars 0 25 419 418 2012-08-26T17:21:36Z Timo 6 3 34 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] [[Category:Update]] fadb188dbfaadbf737d30271a280ebb8c505c313 Creating tracks 0 26 442 441 2012-08-26T17:21:40Z Timo 6 3 22 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * Vdrift program * Vdrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: https://github.com/VDrift/blender-scripts Get the "export-all-joe-0.3.py" script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: git clone https://github.com/VDrift/trackeditor vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt. At least one .joe file should get created for the curve track. Also verify that list.txt is mentioning all the .joe files. An empty list.txt will not load anything in the editor. * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Create a TRACKEDITOR_TP/track.txt file with at least a line "cull faces = on". track.txt is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within vdrift game. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in track.txt if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] [[Category:Review]] fcb8875560232256588219f65df16429dba72fa4 Data directory 0 27 444 443 2012-08-26T17:21:40Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki VDrift must be able to access its game data to run. This data is stored in the data directory. ==Location== VDrift looks in several places to find its game data at startup. This is the order in which the different locations are checked. # The directory specified in the environment variable '''VDRIFT_DATA_DIRECTORY''' # The subdirectory "data" of the current working directory (the location from which VDrift was run) # A directory named at [[Compiling|compile]]-time via the environment variable '''DATA_DIR''' (usually set by the [[Using SCons|SCons]] build setup) {{note|On Windows, only locations 1 and 2 are checked.}} ==Validation== To ensure that it has the correct location, VDrift checks for the file '''data/settings/[[options.config]]'''. If this file can't be found in any of the above locations, VDrift exits immediately. [[Category:Files]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Mac OS X]] [[Category:Operating Systems:Windows]] 477c2f050fe750e821db6bc42d3dd689aa41baa0 Debugging 0 28 448 447 2012-08-26T17:21:41Z Timo 6 3 3 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} Debugging VDrift can help provide the developers with more information on problems, so they can be more effectively fixed. This article hopes to explain how to do this. ==General== VDrift outputs most of its debugging info on to the console via "cout" statements. There are some logs kept in ~/.vdrift/logs/ but they are not used much. To get more output on the console, users can simply use the '''-verbose''' option when running the game: vdrift -verbose This will drastically increase the amount of debugging output. This may reduce game performance but makes it easier to get an idea of where problems are occurring. {{note|On Windows, the game is not usually run in a console so the debugging output can't be seen.}} ==Linux== If the game crashes it is easiest to get information about the crash from GDB, the GNU Debugger. ===GDB=== On Linux debugging can be done using '''gdb'''. First, VDrift must be compiled with debugging symbols. To turn on debugging symbols simply use the '''release=0''' option when running SCons: scons release=0 {{note|VDrift binary releases are stripped of debugging symbols to decrease the size of the binary. These will not produce any useful information if run with GDB.}} Now the binary (which is in the build/ directory if it is not installed) can be analyzed with GDB. Make sure you have the program '''gdb''' installed on your system, then run GDB on the vdrift binary (change "build/vdrift" to just "vdrift" if you ran '''scons install'''): gdb build/vdrift This will put you on the gdb shell where you can then run the game. Here you can also specify any command line arguments to pass to the game. '''-verbose''' is added here as an example, but no options are necessary for debugging. (gdb) run -verbose Now the game will run. You may notice that when running in GDB game performance is less than normal. This is a natural side effect of GDB and nothing to worry about. ====Obtaining a backtrace==== If the game crashes (commonly resulting in a "Segmentation Fault" error) while running in GDB it is possible to obtain a ''backtrace'' of the crash. This is basically the stack of function calls that happened to trigger the crash. To obtain a backtrace within GDB, wait for the game to crash, and then when returned to the GDB prompt, enter the '''backtrace''' command: (gdb) backtrace The output of this command can be posted on the VDrift forums for the developers to see. Please follow up on your post, as we may have other questions for you or may need you to perform other tests to properly identify the problem. [[Category:Development]] [[Category:Update]] [[Category:Expand]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] a220c01a296b24151b1533d2d8a405d554d2a59d Drift scoring 0 29 456 455 2012-08-26T17:24:33Z Timo 6 3 5 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki To find out more about what drifting is and how to do it read [[Drifting Techniques]]. ==Overview== The player's drift score is displayed on the left side of the screen, underneath the lap timer box. ==Start of scoring== The game starts drift scoring when a car satisfies the following conditions, * At least '''2''' of the wheels are on track, and * Car speed is above '''10 m/s''', and * The drift angle (angle between car's orientation and its velocity direction) is more than '''0.2 radian''' (about 11.5 degrees), and less than '''PI/2''' (i.e. spin out). ==End of scoring== The drift scoring ends when either one the following occurs, * Less than '''2''' wheels are on track, or * Car speed is less than '''10 m/s''', or * The drift angle is less than '''0.1 radian''' (about 5.7 degrees) ==Scoring rules== At the beginning of a drift, the game starts accumulating the score for this drift. At the end of a drift, the accumulated score is added to the total score. The accumulated score consists of base score and bonus score; * '''Base score''' - This is simply the length the car has travelled in this drift (in meters). A longer drift will earn higher base score. * '''Bonus score''' - This contains 3 components: ** '''drift length bonus''' - same value as the base score, effectively giving double bonus to longer drifts. ** '''maximum drift speed bonus''' - the value is the maximum drift speed (in m/s) / 2 e.g. a maximum drift speed of 20 m/s will earn a bonus of 10. ** '''maximum drift angle bonus''' - the value is the maximum drift angle (in radian) * 40 / PI e.g. a maximum drift angle of PI/4 (45 degrees) will earn a bonus of 10. If the car goes off track or spins out during a drift, the accumulated drift score is not added to the total score. An accumulated drift score of less than 5 is not added to the total either. [[Category:Playing]] dd22a7d57bd1ceb94f0ce47aac18dbffd73877a5 Drifting techniques 0 30 462 461 2012-08-26T17:24:34Z Timo 6 3 5 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Drifting can be a very tedious and difficult feat to achieve. Some consider it an art, while others consider it recklessness. This is just a game, so pick up your paintbrush! ==About drifting== "Drifting refers to a driving technique and to a motorsport where the driver intentionally over steers, causing loss of traction in the rear wheels through turns, while maintaining vehicle control and a high exit speed. A car is drifting when the rear slip angle is greater than the front slip angle prior to the corner apex, and the front wheels are pointing in the opposite direction to the turn (e.g. car is turning left, wheels are pointed right or vice versa), and the driver is controlling these factors." (from [http://en.wikipedia.org/wiki/Drifting_%28motorsport%29 Wikipedia]) Drifting is caused by a lack of traction to the rear tires. The spinning of the tires causes the vehicle's rear end to "swing" out causing oversteer. Different cars will behave differently due to differences in torque, tire tread, weight placement, and suspension recoil. The spinning of the tires also "pushes" the back end of the car forward, so once in oversteer, it will need to be controlled. ==Initiating a drift== There are a number of ways to get yourself into a drift. As said before, weight placement and suspension recoil can affect your traction on the rear tires. Here are some techniques: ===Handbrake=== Probably the easiest thing to do, but, however, most cars in the game do not have strong enough braking to do this. Just activate the handbrake and it will cause your car to lose traction. ===Steer + gas=== Ride your gas at a moderate RPM and steer into the corner. Once your front end starts turning, give it some more gas and you will get into an oversteer. ===Suspension recoil=== Use your suspension to "jump" the car into a drift. Steer away from the corner quickly and steer back in. This will cause a bouncing effect from left to right (or vice versa). Apply the "steer + gas" technique to get into oversteer if not achieved already. ===The dip=== "Dip" your back tires in the dirt or grass or whatever off the track. This will cause your back end to swing a bit. ==Controlling the drift== This is simple to do, but hard to perfect. Essentially, you will only need to steer to get your wheels pointed the direction you want to go. You will also need to control your throttle. The slower your tires spin, the more traction you will have. The opposite happens with faster spinning tires. Control your throttle and be careful not to give it too much juice or you will most likely spin out. Spinning out usually happens when the car is oversteered too much. The tires keep spinning and your car continues to rotate into the turn, but the front end will have too much traction and cause the car to rotate more. ==Cars== {{update}} Some cars are easier than others to drift in the game. Excessive oversteer can be a problem for beginners. Lots of torque and traction make initiation and recovery easy. *Z06 *GT *G4 [[Category:Playing]] [[Category:Review]] b60cda262b461a9820f159a434a9b44b924a468a Enabling force feedback in kernel 0 31 480 479 2012-08-26T17:24:35Z Timo 6 3 17 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Here is how to enable force feedback on Ubuntu 8.10 64 bits kernels (should also work on 32 bits ones): ==For the G25 owners== If you use a G25 wheel, you need to patch your kernel to be able to use it in its native mode First create a patch file named G25.patch for the kernel ( patches for 2.6.27 and 2.6.28 are provided ). === kernel 2.6.27 === diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c 2009-02-23 22:21:27.000000000 +0100 @@ -57,6 +57,7 @@ { 0x46d, 0xc286, hid_lgff_init }, /* Logitech Force 3D Pro Joystick */ { 0x46d, 0xc294, hid_lgff_init }, /* Logitech Formula Force EX */ { 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */ + { 0x46d, 0xc299, hid_lgff_init }, /* Logitech G25 wheel */ { 0x46d, 0xca03, hid_lgff_init }, /* Logitech MOMO force wheel */ #endif #ifdef CONFIG_LOGIRUMBLEPAD2_FF diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c 2009-02-23 22:23:22.000000000 +0100 @@ -55,6 +55,7 @@ { 0x046d, 0xc286, ff_joystick }, { 0x046d, 0xc294, ff_joystick }, { 0x046d, 0xc295, ff_joystick }, + { 0x046d, 0xc299, ff_joystick }, { 0x046d, 0xca03, ff_joystick }, }; diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c 2009-03-13 18:54:14.000000000 +0100 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c 2009-02-23 22:25:45.000000000 +0100 @@ -316,6 +316,7 @@ #define USB_DEVICE_ID_LOGITECH_HARMONY_64 0xc14f #define USB_DEVICE_ID_LOGITECH_EXTREME_3D 0xc215 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 +#define USB_DEVICE_ID_LOGITECH_WHEELG25 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c @@ -625,6 +626,7 @@ { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEELG25, HID_QUIRK_NOGET }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0, HID_QUIRK_NOGET }, { USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, === kernel 2.6.28 === diff -Naur linux-source-2.6.28/drivers/hid/hid-core.c linux-source-2.6.28.patched/drivers/hid/hid-core.c --- linux-source-2.6.28/drivers/hid/hid-core.c 2009-04-08 06:38:33.000000000 +0200 +++ linux-source-2.6.28.patched/drivers/hid/hid-core.c 2009-04-10 14:15:27.000000000 +0200 @@ -1290,6 +1290,7 @@ { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FORCE3D_PRO) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, diff -Naur linux-source-2.6.28/drivers/hid/hid-ids.h linux-source-2.6.28.patched/drivers/hid/hid-ids.h --- linux-source-2.6.28/drivers/hid/hid-ids.h 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-ids.h 2009-04-10 14:12:44.000000000 +0200 @@ -291,6 +291,7 @@ #define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 +#define USB_DEVICE_ID_LOGITECH_G25_WHEEL 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c diff -Naur linux-source-2.6.28/drivers/hid/hid-lg.c linux-source-2.6.28.patched/drivers/hid/hid-lg.c --- linux-source-2.6.28/drivers/hid/hid-lg.c 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-lg.c 2009-04-10 14:14:17.000000000 +0200 @@ -304,6 +304,8 @@ .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2), .driver_data = LG_FF }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL), + .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), .driver_data = LG_FF2 }, { } ==Enabling force feedback in the kernel== ===Prepare to compile a kernel=== Make sure U have everything needed to compile your kernel : sudo apt-get install fakeroot build-essential makedumpfile libncurses5 libncurses5-dev kernel-package sudo apt-get build-dep linux Get the kernel source code : sudo apt-get install linux-source Now we are ready to start : Prepare your environment: mkdir ~/src cd ~/src tar xjvf /usr/src/linux-source-<version>.tar.bz2 cd linux-source-<version> ===Apply the G25 patch if needed=== copy the G25.patch file into the source directory ( ~/src ) and patch -p1 <../G25.patch the output should be something like that: patching file drivers/hid/usbhid/hid-ff.c patching file drivers/hid/usbhid/hid-lgff.c patching file drivers/hid/usbhid/hid-quirks.c ===Configure the new kernel=== Get the running kernel configuration: cp -vi /boot/config-`uname -r` .config Adjust the kernel configuration: make oldconfig make menuconfig Go to Device Drivers , and HID Devices and enable the following options Force feedback support (EXPERIMENTAL) PID device support Logitech devices support Logitech Rumblepad 2 support PantherLord/GreenAsia based device support ThrustMaster devices support Zeroplus based game controller support With the 2.6.27 kernel on Ubuntu 8.10, I have to disable paravirtualized guest support otherwise the kernel cleaning fail. This is not needed on 2.6.28 on Ubuntu 9.04 beta (2.6.28.11) Go to Processor type and features and disable the following: Paravirtualized guest support ===Compile and package the new kernel=== make-kpkg clean fakeroot make-kpkg --initrd --append-to-version=-ff kernel-image kernel-headers you now have 2 new package files in ~/src. ===Install the new kernel=== sudo dpkg -i linux-image-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb linux-headers-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb [[Category:Configuration]] [[Category:Review]] [[Category:Operating Systems:Linux]] 635b11d2c0f2aac6781804e2d993ae56cbd40905 Executing VDrift 0 32 482 481 2012-08-26T17:24:36Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Executing VDrift is easier if VDrift is installed. See [[Installing VDrift]]. Executing VDrift may make it necessary to adapt VDrift to personal preferences. See [[Configuring VDrift]]. Executing VDrift is different depending on which operating system it is run. So follow the applicable paragraph. = Executing VDrift on Linux = == Executing a Not Installed VDrift on Linux == If VDrift was not installed, compilation has still generated a executable binary file under <tt>build/</tt>. Execute it with: build/vdrift == Executing an Installed VDrift on Linux == For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift In either case VDrift should get executed by vdrift = Executing VDrift on Windows = == Executing a Not Installed VDrift on Windows == If VDrift was not installed, compilation has still generated a executable binary file. To run VDrift on Windows, you just need to double-click on the file '''vdrift.exe''' in the root VDrift directory. == Executing an Installed VDrift on Windows == {{note|We do not have information on this, yet. If you can, please contribute.}} = Executing VDrift on Mac OS = {{note|We do not have information on this, yet. If you can, please contribute.}} 8a50326a8c3ca9ddd6eab346671cb38690f9d0cd Getting VDrift 0 33 492 491 2012-08-26T17:24:37Z Timo 6 3 9 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Getting VDrift should follow getting the prerequisites. See [[Software requirements]]. Getting VDrift enables VDrift to be build. See [[Compiling VDrift]]. Getting VDrift consists of getting its two major parts, the source code and the data. Both are described below. = Latest Release = VDrift releases are available on [http://sourceforge.net/projects/vdrift/ SourceForge]. It is recommended that users download the very latest release for their operating system. == Version Numbering == Each release of VDrift has a version number corresponding to the date of release, in the '''YYYY-MM-DD''' format. The latest release will be have the version number closest to the current date. == Operating Systems == Currently, downloadable releases are usually provided for [[:Category:Operating Systems:Linux|Linux]], [[:Category:Operating Systems:Mac OS X|Mac OS X]], and [[:Category:Operating Systems:Windows|Windows]]. The installer package for a given operating system will be marked as such in the SourceForge download system. === Linux === You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. === Source Package === [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift source package and unpack the archive. tar jxvf vdrift-yyyy-mm-dd-src.tar.bz2 === Windows === === Mac OS === = Development Version = VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. ==Browsing the repositories== VDrift's source on the GitHub web site is at https://github.com/VDrift/vdrift/. Here you may browse the VDrift repositories and even download single files. This is very useful for examining changes between different revisions, in a user-friendly manner. ==Checking out the code== If you want to do much work on VDrift you'll need to check out an copy of the source code and your platform's dependencies. ===Linux/Unix=== Install a git client (eg. [http://git-scm.com/ Git]). If you are using a Linux distribution you can search for it in the package manager. When you have installed it you need to open a terminal and run the following code: git clone git://github.com/VDrift/vdrift.git vdrift It will download the current development version in the subfolder ''vdrift''. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Windows=== The best solution for Windows is to download [http://code.google.com/p/msysgit/ MSysGit]. After installing it, open Windows Explorer and go to the directory to which you want to download the VDrift source code. Right-click and click Git GUI Here. Select Open Existing Repository. In the next screen you need to fill in the URL of the repository which is git://github.com/VDrift/vdrift.git. Simply click OK, and the source code will be downloaded. Then do the same, but with the URL git://github.com/VDrift/vdrift-win.git and make sure that it downloads in a ''/vdrift-win'' directory in the main vdrift directory. Next, [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ===Mac OS X=== First you will need to obtain a git client (eg. [http://mac.github.com/ GitHub for Mac]). Once you have a working Git client open a terminal and navigate to where you wish to download the VDrift source code. Then run the following code: git clone git://github.com/VDrift/vdrift.git vdrift to download the lastest source code to the subfolder ''vdrift''. Then navigate to the ''vdrift'' folder: cd vdrift and download the mac dependencies into the subfolder ''vdrift-mac'': git clone git://github.com/VDrift/vdrift-mac.git vdrift-mac Finally [[Getting_the_development_version#Checking_out_the_data|check out the data]]. ==Checking out the data== The data set is currently only available from the SourceForge SVN (https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data). It needs to be checked out in a ''/data'' directory in the main vdrift directory. If you are using a command-line SVN client and have the VDrift repository checked out in a directory called ''/home/user/vdrift'', you would do this: cd /home/user/vdrift svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data VDrift's code is kept in a Git repository on GitHub. To get the development version, you must "check out" the code from this repository. [[Category:Installation]] ab8c50e803c2fdd647bee58aea9e594c75c7179e Getting more cars 0 34 501 500 2012-08-26T17:24:37Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki <small>[[Getting more cars|English]] - [[Getting more cars/it|Italiano]]</small> A small selection of cars are distributed in the release VDrift packages. This page describes how to get some more. = List of cars = The following cars are in the [[http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. To see pictures of some of the cars visit the [http://cars.vdrift.net cars.vdrift.net] website. {| | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: F1 car (2002) | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 |} = Downloading cars = Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. = Installing cars = Uncompress the .tar.gz file. This should create a folder with the short name of the car containing files like about.txt and body.joe. Move that folder to '''vdrift/data/cars''' folder. Run VDrift and your new car will be ready to drive! = Updating cars = You can update cars from within VDrift itself. Click "Updates" on the main menu, then "Check for updates". If any are available go to the car in the "Manage Cars" section and click "Apply Update". = See also = * [[Getting Tracks]] [[Category:Cars]] 0188c8dd0530615e9c19c783a299a6d3401dc937 Getting cars/it 0 35 508 507 2012-08-26T17:24:38Z Timo 6 3 6 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki <small>[[Getting more cars|English]] - [[Getting more cars/it|Italiano]]</small> ==Aggiungere altre autovetture== Questo articolo spiega come si aggiungono altre autovetture per VDrift e come si installano. ==Trovare ulteriori autovetture== * Una gamma di autovetture si possono trovare sul sito [http://cars.vdrift.net cars.vdrift.net]. Apri semplicemente la pagina dell'autovettura che vuoi scaricare e se lo stato visualizza ''playable'' è possibile utilizzarlo per giocare con VDrift. Quindi scarichi il file .zip o .tar.gz * Puoi anche scaricare autovetture da svn. Clicca i link nell'[[List of cars|elenco di autovetture]] (per il momento disponibile solo in inglese) per andare sulla pagina e quindi clicca sul link 'Download GNU Tarball'. ==Installare le autovetture== A questo punto dovresti disporre di un file .zip o .tar.gz. Entrambi sono formati compattati. Per scompattare i files puoi utilizzare software come '''Ark''' o '''File roller''' per Linux e [http://www.7-zip.org/ 7zip] per Windows. Sono tutti software liberi. Durante la scompattazione normalmente si crea una cartella con il nome dell'autovettura. Questa cartella (che dovrebbe contenere files che si chiamano about.txt e body.joe) nella cartella '''... vdrift/data/cars'''. Quindi eseguire VDrift e la nuova autovettura è pronta per essere guidata! [[Category:Cars]] [[Category:Autovetture]] 6894bc188c8ca393647c111898c956cbf9242441 Getting the development version 0 36 510 509 2012-08-26T17:24:38Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Working with the development version]] 185fd4e7464e473776bb951f973df02251e08944 Getting the latest release 0 37 512 511 2012-08-26T17:24:38Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Getting VDrift]] a891b6ef1a637d88f744a80cf048d736dd03b8cb Hardware requirements 0 38 519 518 2012-08-26T17:24:39Z Timo 6 3 6 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==Processor== VDrift requires a relatively fast CPU. A 2 GHz or better clock speed is recommended, although it should be possible to run VDrift with a 1 GHz or better CPU. ==Memory== On a typical run, VDrift might consume 300 MiB of memory space. 512 MiB of memory may be sufficient on some operating systems. 1 GiB or more is recommended, and required for larger tracks. ==Graphics Device== VDrift requires a recent nVidia or ATI graphics card. A nVidia GeForce 7-series or better (or the equivalent ATI card) is recommended in order to enable all the visual effects. By reducing or disabling some of the [[Configuring the display|display options]], it should be possible to play VDrift with a nVidia GeForce 2 or better. Users should install the newest version of the device drivers for their graphics card to run VDrift. {{note|Intel graphics cards are not supported.}} ==Sound Device== Standard two-channel sound devices should work fine. [[Category:Installation]] 8672c8480c0735307e82068cf79ece6d5cbf04a0 IForce FF support 0 39 528 527 2012-08-26T17:24:39Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki == Linux == This was tested with Guillemot Ferrari Force Feedback Wheel USB, however, it should work on any wheel that uses the iforce kernel module. Kernel should be compiled with force feedback support for iforce module (a recent Ubuntu distribution works out of the box, 10.10 was tested, earlier should work too). Follow instructions on [[Setting up force feedback]], the important steps being: compile VDrift from source with forcefeedback support (SVN r3012 (27th Dec 2010) or later), edit ''VDrift.config'' and set up write permissions for ''/dev/input/eventX'' with something similar to: sudo chmod 777 /dev/input/eventX Follow VDrift console output for any force feedback related message; when working properly it should say the force feedback has been initialized. In Ubuntu you can do sudo apt-get install joystick to install test applications fftest and ffcfstress. fftest should work fine (although the effects are somewhat poor), but ffcfstress erroneously reports that the device has no force feedback support. Still, FF should work well in VDrift. In Windows the driver for the discontinued Guillemot wheel is the same as for Thrustmaster Ferrari Force Feedback Racing Wheel, so there is a good chance that the same applies for this particular Thrustmaster wheel. [[Category:Configuration]] db8f7754835712bbd56e5d232b4a24b7a9ec445e Importing Racer tracks 0 41 536 535 2012-08-26T17:24:40Z Timo 6 3 5 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==Directions for importing Racer tracks== {{note|These instructions are meant for Linux}} * Unzip and put racer files in temporary folder RACER_TP (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces). * Create new folder for track in track editor folder TRACKEDITOR_TP. * Convert all texture names to lowercase in RACER_TP via find . -type f -name \*.tga|sort -r|awk '{f=tolower($1); if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh * Make folder TRACKEDITOR_TP/objects/ * Run the following command: dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces. * Open track editor /data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP. Erase VDRIFT_TP/objects/*.joe (since they are in the pack file). * Add your VDRIFT_TP to VDrift/data/tracks/track_list.txt * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to VDrift/gui/tracks/VDRIFT_TP.png (hopefully these png files will be moved into the folders of the individual tracks soon). * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the commands mogrify -transparent rgb\(255,0,255\) *.png mogrify -fill rgb\(128,128,128\) -opaque rgba\(255,0,255,0\) *.png This can be scripted to speed things up of course. * Set the correct object properties using the VDrift-tracked/listedit [[Listedit tool]]. * Done! [[Category:Tracks]] [[Category:Operating Systems:Linux]] [[Category:Review]] d6084857641f1bd36e14620def135318584e0d66 Installing 0 42 538 537 2012-08-26T17:24:40Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Installing VDrift]] e4271bf981d5803690a71e8761237a8baf92ef41 Installing on FreeBSD 0 43 540 539 2012-08-26T17:24:40Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Old Method of Installing on FreeBSD]] b7c59be328dae6fdcb9679114fc5265421d0c9ef Installing on Linux 0 44 542 541 2012-08-26T17:24:40Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Old Method of Installing on Linux]] a9e5a58722c81bf353dab8f6a0d5be71cb12114d Installing on Mac OS X 0 45 544 543 2012-08-26T17:24:40Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Old Method of Installing on Mac OS X]] a53af30a6d3bfab3d7fcf7f6b8ec79262ae49dda Installing on Windows 0 46 546 545 2012-08-26T17:24:40Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Old Method of Installing on Windows]] 1deb3dea8ae2437444273d636bcbd33f732cef75 JOEPack format 0 47 551 550 2012-08-26T17:24:41Z Timo 6 3 4 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki This is a simple file format that just crams a bunch of files together, like a zip file, but without any compression. ==Technical specification== "JoePack" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 1 of the file format. ''Note: This documentation was generated by reverse engineering the source code. So there may be errors in evaluation.'' === Data Type Map === The following table explicitly defines the various data types used in a JOE file. {| border="1" !Identifier!!Detailed Description |- |unsigned int||32-bit un-signed integer |- |unsigned short||16-bit un-signed integer |- |string[''x'']||Array of characters with length ''x'' |} === File Header === This block of information initiates every file. {| border="1" width="100%" !Data type!!Block offset!!Name!!Description |- |string[8]||0||versionstr |Report the file version that this file conforms to. This specification details version 1 of the format. |- |unsigned int||8||numobjs |This is the number of files contained in the pack |- |unsigned int||12||maxstrlen |The maximum file name length in this pack |} === File Allocation Table (FAT) === The FAT consists of ''numobjs'' entries of the following format: {| border="1" width="100%" !Data type!!Block offset!!Name!!Description |- |unsigned int||0||offset |Offset into the file at which this file starts. This offset is in bytes from the beginning of the file. |- |unsigned int||4||length |The length of the file this entry corresponds to. |- |string[''maxstrlen'']||8||filename |The name of the file stored at this entry. Note that this is not necessarily null terminated - VDrift stores it in a string of length ''maxstrlen + 1'' and pads it with a null character at the end |} === File Data === Following the FAT, the JoePack file simply consists of all the data stored sequentially. Seeking to the offset specified in the FAT (from the beginning of the file) will allow you to read that file's data like normal. [[Category:Files]] [[Category:Review]] f5e93274ec0f5da4abf3d4447e01a8b2a8dba440 JOE format 0 48 565 564 2012-08-26T17:24:42Z Timo 6 3 13 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki This format is based on the md2 format but with a few enhanced features. It can be written to using a python export script for the Blender 3D modeling package. ==Technical specification== "JOE" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 3 of the file format. ''Note: This documentation was generated by reverse engineering model.h and modle.cpp and inspecting the python blender export script. So there may be errors in evaluation.'' === Data Type Map === The following table explicitly defines the various data types used in a JOE file. {| !Identifier!!Detailed Description |- |int||32-bit signed integer |- |short||16-bit signed integer |- |short3||Three consecutive shorts forming an array |- |float||32-bit floating-point value. Unsure of the exact format... probably whatever is implemented by x86 machines. |- |float3||Three consecutive floats forming an array. |} === File Header === This block of information initiates every file. {| border="1" width="100%" !data type!!block offset!!name!!description |- |int||0||magic |'''8441211611'''(0x1F722AADB): number used to identify the file as a JOE file. Currently unchecked by vdrift. |- |int||4||version |report the file version that this file conforms to. This specification details version 3 of the format. |- |int||8||num_faces |every frame is expected to contain the same number of faces (polygons) this value specifies how many. This is currently limited to 32000. |- |int||12||num_frames |Presumably, this details the number of frames used in an animation. Currently constrained to "1" |} === Frame Format === details a single configuration of a model. "File Header.num_frames" frames follow the file header. {| border="1" width="100%" !data type!!block offset!!name!!description |- |int||0||num_verts |the number of vertices used in this frame |- |int||4||num_textcoords |the number of texture coordinates used in this frame. |- |int||8||num_normals |the number of vertex normals used in this frame. |} after each frame header, you will find * File Header.num_faces Face blocks * num_verts Vertex blocks * num_normals Vertex blocks * num_textcoords Texture Coordinate blocks === Face Format === Each frame as "File Header.num_faces" face records immediately following the Frame header (decribed above). A face is basically several lists of indices in to vertex, normal, and text coord arrays described in following sections. For this version, a face is always a triangle ( i.e. a three-vertex polygon ). {| border="1" width="100%" !data type!!block offset!!name!!description |- |short3||0||vertexIndex |Indeces in to the vertex array. These two constructs together define the location of each corner of the face in 3d space. |- |short3||6||normalIndex |Indeces in to the normals array. These two constructs help define how light sources interact with the face at each corner. Normals also help define which side of a face is "front". |- |short3||12||textureIndex |Indeces in to the texture coordinate array. These two constructs together help define which portions of a texture image map to each corner of the face. Note that in the future there may be a multiple of 3 entries in this array to accomidate applying many textures to a single face. Which images are used as textures by a particular model are defined by convention and explained in [[Car files and formats]] and [[Track files and formats]] |} === Vertex Format === A vertex block simply contains a three-element float array. Vertex blocks may have a misleading name because they are used for both vertices and normals. {| border="1" width="100%" !data type!!block offset!!name!!description |- |float3||0||vertex||A three-element float array defining the X, Y, and Z components of a vertex at offsets 0, 4, and 8 respectively |} === Texture Coordinate Format === A texture coordinate is a 2-dimensional coordinate used to map prtions of a texture to a model vertex. {| border="1" width="100%" !data type!!block offset!!name!!description |- |float||0||u||a value between 0 and 1 indicating a position along the width of the texture |- |float||4||v||a value between 0 and 1 indicating a position along the height of the texture. |} [[Category:Files]] [[Category:Review]] 2e897aca2606d1f8f4a26582c5b3ea3448dcab2b License 0 49 570 569 2012-08-26T17:24:43Z Timo 6 3 4 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki VDrift is released under the GNU General Public License (GPL). It is free software. ==GPL== GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. [[Category:General Info]] a5dd96fad3cd5cfae77eed28b97c858309528ebd List of tracks 0 50 572 571 2012-08-26T17:24:43Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[Old List of Tracks]] cd0b0832074ef54777a6bafc3f041f6a57a052a7 Listedit tool 0 51 580 579 2012-08-26T17:24:44Z Timo 6 3 7 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Listedit is part of the [[Track editor]] tools that simplifies working on [[Track files and formats#list.txt|list.txt]] files. It is a command line style program. ==list.txt format== The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location: https://github.com/VDrift/trackeditor/blob/master/listedit/format.txt The numbers next to each of the lines is important to the way the listedit program works. ==Commands== The basic commands are * '''load''' * '''save''' * '''ls''' * '''set''' * '''quit''' * '''addparam''' Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format. ===ls=== The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do: ls 1 sky* To find all of the objects that have the skybox property set to true (1), do: ls 4 1 ===set=== The '''set''' command is similar to '''ls'''. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do: set 1 sky* 4 1 {{note|All of the objects will start with default properties.}} ===addparam=== This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter. [[Category:Tracks]] [[Category:Review]] bc344bbb9df9d7605218b1267518a1726fcaae9b Logitech G25 support 0 52 597 596 2012-08-26T17:24:46Z Timo 6 3 16 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==Windows== The G25 should be fully supported in Windows without any special steps. ==Linux== When initially plugged in, the G25 will be in compatibility mode, which restricts the steering range and disables the clutch pedal and some of the gears on the H-shifter. VDrift includes two tools that can be used to change G25 modes. Either tool can be used; use whichever tool works the best for you. If you want to use force feedback, you'll need to patch your kernel because when set to native mode, the G25 change its product id, and this product id is not known yet by the kernel ( have a look here [[Enabling force feedback in kernel]] ) ===usbtool=== The tool can be found in VDrift/tools/usbtool-0.1.tar.gz. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example) as well as the swig package. Run ./build.sh and then run ./usbtool to see the options available. To set the wheel to native mode and the range to 900 degrees, run: sudo ./usbtool g25-set-range-wheel-900 and sudo ./usbtool g25-set-extended-mode This will likely disconnect the joystick driver. To reconnect it run: sudo rmmod joydev;sudo rmmod usbhid;sudo modprobe usbhid ===G25manage=== The tool can be found in VDrift/tools/G25manage. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run make to compile the tool, then run: sudo ./G25manage --nativemode and sudo ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. ===LTWheelConf=== LTWheelConf is a new tool based on G25manage. https://github.com/TripleSpeeder/LTWheelConf ===Automatically enable native mode=== If your distribution uses udev (such as Ubuntu), you can put this in /etc/udev/rules.d/90-g25-wheel.rules to automatically run G25manage when the wheel is plugged in: SUBSYSTEM!="usb", GOTO="g25_rules_end" ACTION!="add", GOTO="g25_rules_end" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c294", RUN+="/usr/local/bin/G25manage --nativemode" #ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --range 900" LABEL="g25_rules_end" # for a joystick detected by the kernel event interface, with a model name "G25_Racing_Wheel change the permissions on the device file # and add a symlink to the event device file KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", SYMLINK+="input/G25event" KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", MODE="0664", GROUP="games" # No deadzone for the wheel on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=0" # No deadzone for the clutch pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=1" # No deadzone for the break pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=2" # No deadzone for the throttle pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=5" After creating that file and copying the G25manage binary to /usr/local/bin, run "/etc/init.d/udev reload" (or "service udev reload" on Ubuntu karmic) and you no longer have to manually run G25manage. [[Category:Configuration]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] [[Category:Expand]] d40697595c65029ecaee595656a21575e8d25137 Main Page 0 1 646 1 2012-08-26T17:24:48Z Timo 6 3 48 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki '''MediaWiki has been successfully installed.''' Consult the [http://meta.wikimedia.org/wiki/Help:Contents User's Guide] for information on using the wiki software. == Getting started == * [http://www.mediawiki.org/wiki/Manual:Configuration_settings Configuration settings list] * [http://www.mediawiki.org/wiki/Manual:FAQ MediaWiki FAQ] * [https://lists.wikimedia.org/mailman/listinfo/mediawiki-announce MediaWiki release mailing list] 25b5c21bea6319ae81e1379d4e59bdfe9100ce36 Menu system 0 54 651 650 2012-08-26T17:24:48Z Timo 6 3 2 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki The menus are defined by text files in the '''data/skins/skin_name/menus/''' directories, where ''skin_name'' is the name of one of the skins [[Skin system]]. The menus are defined in text files in the [[Configfile format]]. Each of the menu "pages" contains a number of menu "widgets", which have a variety of functions. The menu system was designed to be used with any type of controller. Every action may be triggered by a simple button push, except things like text entry. Users should be able to choose if they wish to point and click with the mouse, use the keyboard's arrow keys, or joystick axes and buttons. Keep this in mind when designing or editing menu pages. Other guidelines for menu writing include: * Try to keep the layouts similar to other menus in the skin. * Keep the menus simple and break them up into subgroups where possible. * Put the most used functions closer to the main menu, and the lesser used things in deeper submenus. * Do not put too many widgets on any one page. * Always check to make sure navigating a menus with the keyboard works in the order expected. ==Adding Menus== To add a new menu, simply create a new text file under '''data/skins/skin_name/menus/''' with the name of the file the same as the name of the menu in camelcase. ===Writing a Menu=== Now you need to define the new menu. Let's look at the Options menu. The game needs to know a little about the menu itself, so the first few lines of every menu look something like this: name = Options widgets = 5 background = gui/box.png dialog = false The <code>name</code> field should be the same as the filename. The <code>widgets</code> field tells the game how many widgets to load from this menu file (it starts at 0, and stops at <code>widgets - 1</code>). The <code>background</code> field tells the game which graphic to use as the menu background. The <code>dialog</code> tells the game if this is a dialog box or not, but right now this option has no effect (dialog boxes are drawn as full size menus). ===Adding Widgets=== Next, you will need to add some widget definitions to your menu. Here's the format for a label widget, this example taken from the Options menu: [ widget-00 ] type = label name = OptionsLabel text = Options center = 0.5, 0.1 width = auto height = auto fontsize = 9 enabled = 0 selected = 0 default = 0 cancel = 0 The first line is the widget ID. This is the identification number of this widget on this menu page. The number also dictates the order in which the menu will be traversed if you use the arrow keys to move through it. The <code>type</code> field tells VDrift what kind of widget it is. <code>name</code> is a non-numeric identifier. <code>text</code> is the text that will appear on the label. <code>center</code> is the relative position of the widget on the screen. <code>width</code> and <code>height</code> are the relative width and height of the label (here we tell VDrift to figure it out automatically, this is generally a good idea). <code>fontsize</code> is the size to draw the text, the value 9 is pretty big, which is good because this label is the menu title. The next values, <code>enabled</code>, <code>selected</code>, <code>default</code>, and <code>cancel</code>, are boolean values. These are available in every widget and tell how the user can interact with it. <code>enabled</code> allows the user to use the widget. A label has no function so in this case it is turned off. <code>selected</code> indicates if this item should be the one selected when the menu is displayed for the first time. Since a user can't use a label, it shouldn't be selected, so this is off too. <code>default</code> is usually used for OK buttons, or buttons that need to trigger saving all the values on the page when they're pressed. <code>cancel</code> is for Cancel buttons and indicates if this is the button to be pressed when Escape is pressed on this menu, and discards any changes made on the menu. ===Making the Menus Accessible from Other Menus=== Navigation through the menu system is done using buttons. Let's say for example you are creating a menu called GameOptions which will allow users to change certain aspects of the gameplay (perhaps such as difficulty level). This menu would be accessed from the existing Options menu. So you'll need to add a button for GameOptions to the Options menu. Here's an example button widget that could do this. [ widget-01 ] type = button name = GameOptionsButton text = Game tip = Change game settings. action = GameOptions center = 0.5, 0.3 color = 0.0, 0.0, 0.8 width = auto height = auto fontsize = 7 enabled = 1 selected = 1 default = 0 cancel = 0 The first thing you notice is all the properties it shares with the label widget. In this case let's say the button is now the first one on the Options menu. The <code>type</code> is now "button" appropriately. Some new options available to a button are: <code>tip</code>, which shows a description of the widget at the bottom of the screen; <code>action</code>, which dictates what happens when the button is pressed (in this case the name of the menu to go to, in other cases, a special function name that tells the game to do something); and finally <code>color</code>, which allows you to change the color of the text in %R, %G, %B format. This particular button has 80% blue text. Take a look at some of the existing menu entries for more examples. ==Warning== The menu system is still a little light on the error checking. Therefore care must be taken when writing menus or editing them that you don't miss something, or the menu may not work at all, may be unreachable or inescapable, or may even cause the game to crash. [[Category:Files]] [[Category:Review]] a61cdd33891af449b03c3bca084b15808c4341f1 Numerical Integration 0 55 694 693 2012-08-26T17:24:55Z Timo 6 3 42 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[Image:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[Image:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[Image:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[Image:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |tied 1/2 |6 |- !SUVAT |4 |2 |tied 1/2 |5 |- !NSV |6 |4 |tied 3/4 |tied 1/2 |- !Modified Verlet |3 |4 |tied 3/4 |tied 1/2 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |5 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift requires stability in the face of stiff overdamped systems, and currently uses the SUVAT method due to slightly improved accuracy over the euler method. [[Category:Development]] bf952375e2ceed40526b04c23101134aa5fa1f3b Old List of Tracks 0 56 705 704 2012-08-26T17:24:56Z Timo 6 3 10 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more tracks]] for information about how to install new tracks. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/a1ring/ A1 Ring] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/bahrain/ Bahrain] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/barcelona/ Barcelona] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/brands/ Brands Hatch] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/charade70/ Charade 1970] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/detroit/ Detroit] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dijon/ Dijon-Prenois] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dirt-3/ Australian Countryside] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/estoril88/ Estoril 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/fuji/ Fuji] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hockenheim/ Hockenheim] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hungaroring06/ Hungaroring 2006] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/imola2005/ Imola 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/indianhill/ Indian Hill] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/interlagos/ Interlagos] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jarama/ Jarama] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jerez88/ Jerez 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/kyalami/ Kyalami] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lagunaseca/ Laguna Seca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lemans/ Le Mans] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/magny/ Magny] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/melbourne/ Melbourne] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco/ Monaco] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco88/ Monaco 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/montreal/ Montreal] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza/ Monza] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza88/ Monza 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/mosport/ Mosport] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/nuerburgring_nordschleife/ Nürburgring Nordschleife] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Parking Lot] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Pau] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/paulricard88/ Paul Ricard 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ring2007/ Ring 2007] (Nürburgring Nordschleife 2007) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/road_atlanta/ Road Atlanta] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/rouen/ Rouen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ruudskogen/ Ruudskogen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/sepang/ Sepang] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa/ Spa-Francorchamps] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa2008/ Spa-Francorchamps 2008] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/suzuka2005/ Suzuka 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/vir/ Virgina International] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/weekend/ Weekend Drive] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/zandvoort/ Zandvoort] [[Category:Tracks]] db2479802efb82d6325864dc2ec3090f81293387 Old List of cars 0 57 721 720 2012-08-26T17:24:58Z Timo 6 3 15 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki These are all the cars currently available in VDrift. Some of them are only available in the [[Getting the development version|development version]]. Refer to [[Getting more cars]] for information about how to install new cars. * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: 2002 F1 car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 [[Category:Cars]] 9cbed90664b7465fac48cf50563b760e89da94a0 Old Method of Compiling Bullet 0 58 724 723 2012-08-26T17:24:58Z Timo 6 3 2 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|These are the old directions of compiling Bullet. The directions for the current version are on the [[Compiling]] page.}} The Bullet physics library must be manually built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): tar zxvf bullet-X.tgz cd bullet-X Then, proceed as below using either jam or cmake as your build tool: =Using Jam= ./autogen.sh ./configure jam bulletcollision bulletmath =Using CMake= cmake . make =Using autotools= ./autogen.sh ./configure make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} [[Category:Historical]] 26c86f29da633f0d9de808dc35d7c498f0b8ef7b Old Method of Compiling on FreeBSD 0 59 729 728 2012-08-26T17:24:59Z Timo 6 3 4 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} To compile VDrift on FreeBSD, use the ports system. ==Latest Release== Simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ==Development Version== First, [[Getting the development version|get the development version]]. Next, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel Now to compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends [[Category:Development]] [[Category:Operating Systems:FreeBSD]] 77e6574af1fe4003d17940bf196936b6aff4eff9 Old Method of Compiling on Linux 0 60 739 738 2012-08-26T17:25:00Z Timo 6 3 9 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libbullet-dev libasio-dev libboost-dev libcurl4-gnutls-dev libarchive-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev {{note|VDrift requires libglew version greater than 1.5.3.}} For Ubuntu: * https://launchpad.net/~amuzen/+archive/ppa * Or download http://glew.sourceforge.net/ the zipped or tared version of glew (repo one doesn't build) and do "make; sudo make install" ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] c22705d2885993b8e688723195427490ca06d021 Old Method of Compiling on Mac OS X 0 61 751 750 2012-08-26T17:25:02Z Timo 6 3 11 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} This page documents how to compile VDrift on the Mac OS X operating system. ==Prerequisites== The VDrift Mac OS X project requires Xcode 3.2 or later. The latest version, [http://developer.apple.com/xcode/ Xcode] 4.1 is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Get the VDrift source code, either from the latest source release on the [http://sourceforge.net/project/showfiles.php?group_id=137283 VDrift downloads page], or the [[Getting the development version#Mac OS X|development version]]. ==Building== Open ''tools/osx/vdrift.xcodeproj'' and in Xcode 4 or higher click "Build" in the "Product" menu, otherwise hit "Build" from XCode's "Build" menu. ==Error fixing== If when building, you get some errors, it is most likely because the Xcode project is out of date (it often is as we don't have an active Mac OS X developer). To fix it: * Remove files from Xcode that are in the project but not in the repository anymore. * Add new files to Xcode that are in the repository, but have not yet been added to the project. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Mac OS X]] c83f333cc944448d91a633b29cbbab348cd27e20 Old Method of Compiling on Windows 0 62 796 795 2012-08-26T17:25:11Z Timo 6 3 44 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} ==Prerequisites== * Get the VDrift source code and data [[Getting the development version#Windows|development version]]. * Alternatively you can download certain vdrift revisions from gihub/sourceforge web interfaces. For source select a tag and click download https://github.com/VDrift/vdrift and https://github.com/VDrift/vdrift-win. Place vdrift-win into vdrift directory. For data select a tag and download the tarball http://vdrift.svn.sourceforge.net/viewvc/vdrift/tags/. Place data into vdrift directory. ==Building with Code::Blocks/MinGW== * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run "vdrift-win\premake4 codeblocks" command line from vdrift directory to generate the solution. ==Building with MSVC== * Run "vdrift-win\premake4 vs2008" or "vdrift-win\premake4 vs2010" command line from vdrift directory to generate the appropriate solution. ==Building with Scons(broken)== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path(e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4] * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20] * Run the installer. It should find your Python installation, accept all defaults. * Your PATH Environment Variable should contain the Python and Python scripts paths(e.g. C:\Python26;C:\Python26\Scripts;). * Open a new CMD prompt by choosing START, RUN, cmd, OK. * Change directories to the spot where you checked VDrift out. * Now, to build VDrift, run the command: tools/win/bin/build_vdrift.bat ==Run VDrift== * Move or copy the VDrift data to a directory named data within the root VDrift directory. This can be done in a few different ways, depending on how you obtained the VDrift data. You could check it out directly here, or you could check it out in another place and use TortoiseSVN to export it to this location. If you downloaded a VDrift data archive you can extract it here, or extract it elsewhere and then move or copy the necessary files to runtime. In the end, just make sure you have a directory structure with paths like '''VDrift/data/cars/''', '''VDrift/data/tracks/''', etc. * Now, to run VDrift, you just need to double-click on the file '''vdrift.exe''' within the root VDrift directory. [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Windows]] 2d5dccd3fb9e9fa1ba1fda033cdcf7040fd8450e Old Method of Installing on FreeBSD 0 63 805 804 2012-08-26T17:25:12Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} To install VDrift on FreeBSD, you must have an internet connection. You can either build VDrift from source using the ports system, or install a precompiled package. ==Installing from Source== See [[Compiling on FreeBSD]]. ==Installing from Pre-compiled Package== To install the binary package, just use '''pkg_add''': pkg_add -r vdrift {{note|If you choose install vdrift from packages, you must install vdrift-data from FreeBSD ports tree, because this is not available as package.}} cd /usr/ports/games/vdrift-data && make install clean clean-depends [[Category:Installation]] [[Category:Operating Systems:FreeBSD]] 2e35247843624e8176c52c888ed375d213c5887b Old Method of Installing on Mac OS X 0 64 820 819 2012-08-26T17:25:14Z Timo 6 3 14 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} ==Prerequisites== * See [[Hardware requirements]] and [[Software requirements]]. * VDrift requires Mac OS X 10.4 "Tiger" or higher. ==Binary Install== * Download the latest VDrift release for Mac OS X from the link on the homepage at [http://vdrift.net/ vdrift.net] or [http://sourceforge.net/projects/vdrift/files/vdrift/ SourceForge]. * If it doesn't automatically open, double click the ''vdrift-mac-yyyy-mm-dd.dmg'' file (probably in your download folder). * Drag or copy all the files and folders from the resulting mounted disk image named "VDrift" to your ''Applications'' folder. * Double-click the ''vdrift'' application now found in your ''Applications'' folder. ==Compiling from Source== If you're interested in developing VDrift or checking out the very latest additions to the project, then you may want to try [[Compiling#OS X|compiling from source]]. [[Category:Installation]] [[Category:Operating Systems:Mac OS X]] 0cb0af367d22d2437352ba2b336596034b2636e2 Old Method of Installing on Windows 0 65 832 831 2012-08-26T17:25:15Z Timo 6 3 11 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} == Download == Download the latest VDrift executable from: [http://sourceforge.net/project/showfiles.php?group_id=137283 this link] Download the full install package (an exe file). Do not follow the sourceforge download (green box on the right) link. Instead, expand the downloads list with a click on the left side. == Installation == For the installation just double click on the downloaded file. A wizard will start and will ask some simple questions (such as the installation directory). When the wizard ends you can start VDrift from the start menu (if you have chosen to install the shortcuts). [[Category:Installation]] [[Category:Operating Systems:Windows]] [[Category:Update]] [[Category:Expand]] fe66649102e9117476d72053e66664603000eff8 Old Numerical Integration 0 66 835 834 2012-08-26T17:25:15Z Timo 6 3 2 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[Image:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[Image:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[Image:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[Image:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[Image:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[Image:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[Image:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[Image:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[Image:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. [[Category:Historical]] a658f0001bf6393fe46a340449574479eb5f7b1d Options.config 0 67 840 839 2012-08-26T17:25:16Z Timo 6 3 4 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki VDrift has a set of options which can be added to menus, referenced by the game, and used as a template for a player's settings. These options are defined in '''data/settings/options.config''' in the [[Configfile format]] that VDrift uses for many of its other text files. Once defined, these options can be referred to by the menus to do several things, including: pick default values for options, to get names, descriptions, and lists of values for options, check the type of options, and much more. {{note|The options.config file is '''not''' the place where the user's settings are stored. Users should never need to edit this file. User options are set in [[VDrift.config]].}} The options tell what values are available to the user for a given setting. This may seem confusing. Here's an example definition of an option in the file: [ option-17 ] cat = display name = view_distance title = View Distance desc = Change the maximum view distance. type = float default = 500.0 values = list num_vals = 5 opt00 = Very Low (0.25 km) val00 = 250.0 opt01 = Low (0.5 km) val01 = 500.0 opt02 = Medium (1 km) val02 = 1000.0 opt03 = High (2.5 km) val03 = 2500.0 opt04 = Very High (10 km) val04 = 10000.0 The first line has the option ID number. This must be in the format <code>[ option-## ]</code> and number must be less than num_options. No two widgets should have the same ID. The first field, <code>cat</code>, is just for categorization. This option is in the display category. Next comes the option's name, which combined with the category, makes up the name by which the option is referred to in the menu (here, "display.view_distance"). The <code>title</code> field tells the human-readable name for this option. <code>desc</code> tells a little more about the option, this usually goes in the tip for the option in the menu. <code>type</code> is very important because it tells the game how to interpret the values given to it for each option. This particular option is a floating point option, which means it has a decimal, so it is <code>type</code> float. <code>default</code> is, as you probably guessed, the default value for the option. The <code>values</code> needs a little extra explanation. In this case it is "list" which means that the possible values for the option will be listed along with this option definition. Sometimes <code>values</code> is given an alternate value which tells the game to get the list of values from some other special place. Since this option needs a list of values, we define the list: <code>num_vals</code> tells how many possible options there are; and the following <code>opt-##</code> and <code>val-##</code> fields describe the displayed name for the value, and the actual value, respectively. The <code>opt-##</code> fields are assumed to be strings, but the <code>val-##</code> fields must be of the same type as the type of the object, as must the <code>default</code> setting described earlier. Putting the wrong type of values here can cause very unexpected results. [[Category:Files]] [[Category:Expand]] 5efa29d53f5aa06b68db1a54a82e6d65136cb3a5 Packaging 0 68 851 850 2012-08-26T17:25:17Z Timo 6 3 10 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Packaging VDrift is different depending on the operating system on which it is packaged. ==Common== The data/settings/updates.config file should be updated to contain the cars that will be included in the release along with their SVN revision numbers. ==Linux== ''See [[Packaging on Linux]]'' ==FreeBSD== ''See [[Packaging on FreeBSD]]'' ==Mac OS X== ''See [[Packaging on Mac OS X]]'' ==Windows== ''See [[Packaging on Windows]]'' [[Category:Development]] 681fac7a075cfded7d2d054fa34d05217c55abe5 Packaging on Linux 0 69 854 853 2012-08-26T17:25:17Z Timo 6 3 2 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Make sure you have a working build to release - check [[Getting the development version]] and [[Compiling on Linux]]. ==Binary packages with autopackage== ===Prerequisites=== There are some things you need before you can build an autopackage. First and most importantly, the autopackage development tools are needed. As of this writing, only the version in autopackage svn will correctly build the VDrift packages. The next release of the autopackage tools should have all the patches needed to build proper packages. BinReloc is used by VDrift but the code has been imported and you do not need to download this to build a package. You do however need apbuild. Second, you must have two different compilers installed on your machine. This is to do the double-compiling so the vdrift binary will work on Linux no matter what version of glibc was used to build the distribution. Currently, the VDrift package setup uses g++-3.3 and g++-4.1, with gcc-4.1. Another known working setup is g++-3.3, g++-3.4, and gcc-3.4. The compiler versions are set in the tools/autopackage/vdrift.apspec file in [[Getting the development version|VDrift Git]]. ===Building=== The [http://autopackage.org/ autopackage] project is a very promising and useful next-generation packaging tool for Linux. It aims to help developers create packages that will work on any Linux distribution. VDrift's autopackage creation is integrated into the SCons build system used to build the Linux version of VDrift. To build an autopackage, simply run scons autopackage Two options are important when running this command, '''minimal''' and '''release'''. For instance, scons autopackage minimal=1 will build a package with the minimal data set. This can be combined with the release option to make a release-optimized package with the minimal data set: scons autopackage minimal=1 release=1 Turning these options to 0 turns them off. This affects the package built as one might expect. The package name reflects how it was built. For example: VDrift yyyy-mm-dd-dev-minimal.package VDrift yyyy-mm-dd-full.package Usually the file is renamed to replace the space with a '-' character, so that the URL to the package does not have to contain a "%20". ==Source packages== Source packages are made in a similar way as autopackages using SCons. scons src-package builds a package named similarly. This package is put into the build/ directory. Currently the build system does tar the source package after compiling it in the build/ directory, but it includes the build directory as a parent in the archive itself. Since this function is not used that much, it has been a low priority to fix, and it is also pretty simple to just run tar manually and create the package. Before doing this however, it is useful to warn the user that there is no data in the source package and they must download one of the source packages in order to install the game. This can be done by replacing the file data/SConscript in the file with the file in the SVN repository data/SConscript.no_data. This is a minor change made to the build system when source packages are made. So, to make all this make sense, here are the commands to build a source package correctly: scons src-package cd build cp ../data/SConscript.no_data data/SConscript tar -jcvf vdrift-yyyy-mm-dd-src.tar.bz2 vdrift-yyyy-mm-dd-src/ Thus you end up with the file '''vdrift-yyyy-mm-dd-src.tar.bz2''' as a finished source package. [[Category:Development]] [[Category:Operating Systems:Linux]] [[Category:Review]] 63c838912ef6981eb8cd3b24b52497236dca237c Packaging on Mac OS X 0 70 857 856 2012-08-26T17:25:17Z Timo 6 3 2 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki This page documents how to package VDrift for release on the Mac OS X operating system. ==Prerequisites== Make sure you have a working build to release - check [[Getting the development version]] and [[Compiling on Mac OS X]]. ==Packaging== In Xcode 4 or higher: * First change the "Bundle versions string, short" in Info.plist from yyyy-mm-dd to the date of the release. * Then click "Edit Scheme..." in the "Product" menu, select the Run item on the left and change "Build Configuration" to Release. * Now build the application and you will get a file named ''vdrift-mac-yyyy-mm-dd.dmg'' in ''build/Release''. Just change the date again and this file can be uploaded to Sourceforge. * Once you've finished remember to reset the version to yyyy-mm-dd in Info.plist and the build configuration to Debug before committing any changes. If you don't have Xcode 4, do the same as above but replace the second step with: * Switch to the "Release" Build style using the popup-menu in the toolbar and hit "Build" from XCode's "Build" menu. [[Category:Development]] [[Category:Operating Systems:Mac OS X]] [[Category:Review]] 19958fb5c69d7f4665dfadcee779dadd63b4a357 Packaging on Windows 0 71 859 858 2012-08-26T17:25:17Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki This page documents how to package VDrift for release on the Mac OS X operating system. ==Prerequisites== * Nullsoft installer system: http://nsis.sourceforge.net/ * A working build to release - check [[Getting the development version]] and [[Compiling on Windows]]. ==Packaging== In the directory tools/win you can find 2 .nsi files. One for the minimal release and one for the full release. If you installed nsis you can right click on the vdrift.nsi or vdrift-minimal.nsi file and select "compile script". The installer will be created now. '''Please do not forget to change the version in the .nsi files (at the top of the files)''' [[Category:Development]] [[Category:Operating Systems:Windows]] [[Category:Review]] bc4ea27337da1754dd65d5d2dfaf009d05ab09be Profiling 0 72 863 862 2012-08-26T17:25:17Z Timo 6 3 3 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki There are two profiling methods used to evaluate performance of VDrift code. VDrift provides its own in-game profiling system, or it may produce output suitable for the GNU gprof profiler. ==In-game Profiling== When VDrift is run with the <code>-profiling</code> command-line option, certain parts of the game code (determined by the developers and hard-coded in the source) are evaluated as the game runs. vdrift -profiling During execution, each profiled subsystem of the game is listed along the left side of the game window, along with the amount of time spent on that subsystem during the last tick. After VDrift exits, summarized profiling information is output to the '''stdout''' stream, including the percentage of time spent in each subsystem. ==Profiling with gprof== When VDrift is [[Compiling|compiled]] with the '''profiling''' [[Using SCons|option]] enabled, it produces output suitable for examination with the gprof tool. Compiling with the '''profiling''' option enabled: scons profiling=1 Run VDrift: build/vdrift After exiting, run gprof on the executable: gprof build/vdrift [[Category:Development]] d23a00f3facc6084df325b3b02b9b33a8337f8fe Replays 0 74 881 880 2012-08-26T17:25:19Z Timo 6 3 3 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Replays are recorded while playing in any game mode, and can be viewed through the Replays menu. ==Features== * Skip forward/backward controls (default "," and ".") * Replays can be recorded in any game mode ==Settings== The current number of replays and the selected replay are stored in the file [[VDrift.config]], and are defined in [[options.config]]. Their option names are '''game.num_replays''' and '''game.selected_replay''', respectively. ==Recording== To record a replay, simply set the "Record Session" option on the menu to start the game to "On". Then start the game. During gameplay you will see a message at the bottom of the screen telling you how much recording time is left. The recording system is currently limited to a fixed file size, and stops recording once this size is reached. To stop recording, simply leave the game or quit VDrift altogether. The replay is saved when it is stopped. This means if the game crashes, the replay is not saved. ==Playback== To play back a replay, simply enter the Replays menu from the Main menu. Here you can select the replay by its ID number and play it back by pressing the "Start Replay" button. As new replays are recorded they are added to the available replays in this menu. The new replay's ID number is the one after the last current replay. [[Category:Playing]] [[Category:Review]] b0ed8d4db5e8f919061d176c9d9bc9f9557c6e42 Reporting problems 0 75 886 885 2012-08-26T17:25:19Z Timo 6 3 4 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki This page will give you a good idea of how to report problems to the project in a useful way. ==Before reporting== Here are some things you should do before reporting issues to us: * Make sure you've got the latest version of VDrift from the [http://vdrift.net/ VDrift homepage]. * Read the release notes for the version of VDrift you are using, and the platform you are running it on. Be sure to check the Known Issues section. * Make sure you've got the latest drivers installed for your video card. * Find a way to reproduce the problem, if you can. * Search the forums for topics already containing your problem. At least read through the most recent [http://vdrift.net/Forum/viewforum.php?f=1 Help] and [http://vdrift.net/Forum/viewforum.php?f=3 Bugs] posts to make sure this isn't already being discussed. If it's a big problem, the likelihood is that there's a topic about on the front page of the site. ==Tips for reporting problems== If you've done everything above, and still have a problem, report the issue in the [http://vdrift.net/Forum/viewforum.php?f=1 Help] or [http://vdrift.net/Forum/viewforum.php?f=3 Bugs] forums, following these tips: * Put a meaningful title on your thread. ** "Please help me" or "problem with game" do not tell us anything at all. You need not say that there's a problem, after all you are in the Help forum. ** Here are examples of good topics: "Car won't shift gears", "lap is not triggered", "AI car turns wrong way", "HUD is not drawn". These topics are all short, but tell us what the topic is about before we read it. It is also much easier to search through topics when they have good titles. * Make sure you provide every bit of information you know, even if you think we might not need to know it. This will help us reproduce and fix the problem faster. ** Always include details about your hardware, operating system and library versions. This helps us tell where the problem lies. We can't help or begin to debug a problem until we know where it is. There are many more things that cause problems besides the game code - problems can be caused by hardware (including CPU, memory, video card, sound card, video memory), operating system, drivers (for video and sound, mainly), or the libraries used on your system (this applies mainly to Linux and FreeBSD). ** Give as many details about how to reproduce it as possible. ** If you can, include a screenshot of your problem. We provide space in our [http://vdrift.net/Gallery/admin.php?album_id=0&mode=upload gallery] where you can upload your shots. * Use your very best English. It's the only language we all understand. The better you write, the easier and quicker it is for us to understand your problem. We understand if you make a few mistakes, but please do your best. ** If you are not a native English speaker, we will do our very best to understand you. ** If you are a native English speaker, we should not have to spend extra time trying to decipher your post, just because you are too lazy to spell correctly and use correct grammar and punctuation. ** These things are sometimes hard to describe. Take your time and write as much as you need to tell us about your problem. * Check back regularly after reporting a problem. We may have questions or possible solutions, as well as tests we may need you to run so we can discover more about how the game runs on your system. Try to respond as quickly as possible, and we'll do the same. ==Examples of reports== Here's a bad example of a bug report: Topic: HELP OH NO!!!!!! when i start up the game it shows some stuff and then goes away what do i do how do u fix it Here's a good example of a bug report: Topic: Crash in latest Windows release Hi, I downloaded the full version of VDrift for Windows (version 2007-03-23) and it crashes whenever I try to start a new game. The menus all function correctly. My system is Windows XP SP2, P4 2 GHz CPU, 1 GB RAM and GeForce 5600 video card with nVidia drivers 9.4.3.2. [[Category:General Info]] 6c40d852e158eb26c377681080b8f79e70e014d5 1111 886 2012-08-26T19:31:45Z Timo 6 3 Update links for new forum, and remove reference to gallery wikitext text/x-wiki This page will give you a good idea of how to report problems to the project in a useful way. ==Before reporting== Here are some things you should do before reporting issues to us: * Make sure you've got the latest version of VDrift from the [http://vdrift.net/ VDrift homepage]. * Read the release notes for the version of VDrift you are using, and the platform you are running it on. Be sure to check the Known Issues section. * Make sure you've got the latest drivers installed for your video card. * Find a way to reproduce the problem, if you can. * Search the forums and check the issue tracker for topics already containing your problem. At least read through the most recent posts in the [http://vdrift.net/Forum/forumdisplay.php?fid=5 Help] and [http://vdrift.net/Forum/forumdisplay.php?fid=7 Bugs] forums and the open issues on [https://github.com/VDrift/vdrift/issues GitHub] to make sure this it hasn't already been reported. If it's a big problem, the likelihood is that there's a topic about on the front page of the site. ==Tips for reporting problems== If you've done everything above, and still have a problem, report the issue in the [http://vdrift.net/Forum/forumdisplay.php?fid=5 Help] or [http://vdrift.net/Forum/forumdisplay.php?fid=7 Bugs] forums, following these tips: * Put a meaningful title on your thread. ** "Please help me" or "problem with game" do not tell us anything at all. You need not say that there's a problem, after all you are in the Help forum. ** Here are examples of good topics: "Car won't shift gears", "lap is not triggered", "AI car turns wrong way", "HUD is not drawn". These topics are all short, but tell us what the topic is about before we read it. It is also much easier to search through topics when they have good titles. * Make sure you provide every bit of information you know, even if you think we might not need to know it. This will help us reproduce and fix the problem faster. ** Always include details about your hardware, operating system and library versions. This helps us tell where the problem lies. We can't help or begin to debug a problem until we know where it is. There are many more things that cause problems besides the game code - problems can be caused by hardware (including CPU, memory, video card, sound card, video memory), operating system, drivers (for video and sound, mainly), or the libraries used on your system (this applies mainly to Linux and FreeBSD). ** Give as many details about how to reproduce it as possible. ** If you can, include a screenshot of your problem. * Use your very best English. It's the only language we all understand. The better you write, the easier and quicker it is for us to understand your problem. We understand if you make a few mistakes, but please do your best. ** If you are not a native English speaker, we will do our very best to understand you. ** If you are a native English speaker, we should not have to spend extra time trying to decipher your post, just because you are too lazy to spell correctly and use correct grammar and punctuation. ** These things are sometimes hard to describe. Take your time and write as much as you need to tell us about your problem. * Check back regularly after reporting a problem. We may have questions or possible solutions, as well as tests we may need you to run so we can discover more about how the game runs on your system. Try to respond as quickly as possible, and we'll do the same. ==Examples of reports== Here's a bad example of a bug report: Topic: HELP OH NO!!!!!! when i start up the game it shows some stuff and then goes away what do i do how do u fix it Here's a good example of a bug report: Topic: Crash in latest Windows release Hi, I downloaded the full version of VDrift for Windows (version 2007-03-23) and it crashes whenever I try to start a new game. The menus all function correctly. My system is Windows XP SP2, P4 2 GHz CPU, 1 GB RAM and GeForce 5600 video card with nVidia drivers 9.4.3.2. [[Category:General Info]] d3a3c10c64868248785ed1ebced34a4bf566e9fb Setting up force feedback 0 76 895 894 2012-08-26T17:25:20Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Force feedback is currently only supported on Linux. ==Prerequisites== * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in kernel-source/drivers/usb/input/hid-ff.c * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be /dev/input/eventX). * you must have write permission to /dev/input/eventX * VDrift SVN r1547 or later If you need to recompile your kernel to enable force feedback, you can have a look here [[Enabling force feedback in kernel]] ==Enabling force feedback in VDrift== Once you've met the prerequisites, recompile vdrift like this: scons force_feedback=1 Now open your VDrift.config. Find the section [ joystick ] and add the following line to the joystick section somewhere: ff_device = /dev/input/event0 change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. [[Category:Configuration]] [[Category:Operating Systems:Linux]] [[Category:Review]] 2b2531d2d95e7dc722c971ad746a92facd46b83b Software requirements 0 77 912 911 2012-08-26T17:28:34Z Timo 6 3 10 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} The following software needs to be installed on a computer for it to run VDrift. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Linux * FreeBSD * Mac OS X * Windows ==Device Drivers== It is advisable to always use the latest version of the device driver for [[Hardware requirements#Graphics Device|graphics cards]]. ==Libraries== Compilation and execution depend on the following libraries: * [http://bulletphysics.org Bullet Physics library] - only the following are required: ** Bullet Collision ** Bullet Dynamics ** Bullet SoftBody ** LinearMath * cURL * [http://glew.sourceforge.net/ GLEW] * [http://xiph.org/ogg/ Ogg] * [http://www.opengl.org/ OpenGL] * [http://www.libsdl.org/ SDL] * [http://www.libsdl.org/projects/SDL_image/ SDL_image] * [http://www.ferzkopp.net/joomla/content/view/19/14/ SDL_gfx] * [http://xiph.org/vorbis/ Vorbis] * GLU * [http://think-async.com/ asio] * [http://www.boost.org/doc/libs/release/libs/bind/bind.html Boost] * pthread To [[Compiling|compile]], it is necessary to install the header files for these libraries. On some operating systems, such as Linux and FreeBSD, these libraries must be installed on the system first before VDrift will run. On Mac OS X and Windows, all the necessary library files are packaged with VDrift. ==Build Tools== To compile VDrift, you'll also need * [http://gcc.gnu.org/ GNU C++ compiler] (version 3.2 or greater) * [http://www.scons.org/ SCons] Other build tools are sometimes required, and alternative build options are sometimes available, depending on the target operating system (see [[Compiling]] for details). [[Category:Installation]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] [[Category:Review]] 94c79cb648b1456d84b5f5c26b2e9bdc537c2c48 Sound/Audio Development 0 78 921 920 2012-08-26T17:28:35Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki These are some preliminary recordings of a miata. Discussion is welcomed here and in the forum thread: [http://vdrift.net/Forum/viewtopic.php?t=816 Collecting Audio] ==Notes== Some notes on the sounds: **Inside - 2 microphones in a 180 degree stereo setup behind the driver headrest. **Behind - 2 Microphones in a 45 degrees stereo setup 7 feet behind the car. **Some filenames have odd case, I'll make all lowcase standard in the future. **I did very little to the raw audio other than a little compression to lessen the dynamic range. **Some of these are very quiet, such as the 1k inside. ==Miata sounds== The .wav files for each recording: ===Inside=== **[http://fangbaby.com/share/vdrift/01%20-%201k%20inside.wav 1k inside] **[http://fangbaby.com/share/vdrift/02%20-%202k%20inside.wav 2k inside] **[http://fangbaby.com/share/vdrift/03%20-%203k%20inside.wav 3k inside] **[http://fangbaby.com/share/vdrift/04%20-%204k%20inside.wav 4k inside] **[http://fangbaby.com/share/vdrift/05%20-%205k%20inside.wav 5k inside] **[http://fangbaby.com/share/vdrift/06%20-%206k%20inside.wav 6k inside] **[http://fangbaby.com/share/vdrift/07%20-%207k%20inside.wav 7k inside] **[http://fangbaby.com/share/vdrift/08%20-%20Revlimit%20Inside.wav RevLimit inside] **[http://fangbaby.com/share/vdrift/09%20-%20750to7k%20inside.wav 750to7k inside] ===Behind=== **[http://fangbaby.com/share/vdrift/10%20-%201k%20Behind.wav 1k behind] **[http://fangbaby.com/share/vdrift/11%20-%202k%20Behind.wav 2k behind] **[http://fangbaby.com/share/vdrift/12%20-%203k%20Behind.wav 3k behind] **[http://fangbaby.com/share/vdrift/13%20-%204k%20Behind.wav 4k behind] **[http://fangbaby.com/share/vdrift/14%20-%205k%20Behind.wav 5k behind] **[http://fangbaby.com/share/vdrift/15%20-%206k%20Behind.wav 6k behind] **[http://fangbaby.com/share/vdrift/16%20-%207k%20behind.wav 7k behind] **[http://fangbaby.com/share/vdrift/17%20-%20Revlimit%20behind.wav RevLimit behind] **[http://fangbaby.com/share/vdrift/18%20-%20Start%20Behind.wav Start behind] **[http://fangbaby.com/share/vdrift/19%20-%20Stop%20Behind.wav Stop behind] ===Moving Inside=== **[http://fangbaby.com/share/vdrift/20%20-%20Moving.wav Moving Inside] **[http://fangbaby.com/share/vdrift/21%20-%20Moving2.wav More Moving Inside] [[Category:Cars]] [[Category:Development]] 4a99aa9c4d6d322c4afe371b856375580e210710 Sound/graphics formats 0 79 925 924 2012-08-26T17:28:35Z Timo 6 3 3 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki ==Textures== Textures are all in [http://www.libpng.org/pub/png/ Portable Network Graphic (PNG)] format. Graphics can be 24 or 32 bit color, but if you don't need the Alpha channel leave it out. We prefer to produce these graphics using [http://gimp.org/ The GIMP], and many of the originals in the [[Art repository]] are in GIMP's native format (XCF). Other originals are created in [http://inkscape.org/ Inkscape] using its native [http://www.w3.org/TR/SVG/ Scalable Vector Graphics (SVG)] format. ==Models== Models used in the game are all [[JOE format]], which is produced by a Python script for [http://www.blender3d.org/ Blender3D]. Currently models are used for cars (glass, interiors, wheels, etc.) and track objects. Get the modeling tools from the '''tools''' directory of the [[Art repository]]. There are two [[JOE export scripts]], '''export-joe-0.3.py''' and '''export-all-joe-0.3.py'''. ==Sounds== Sounds are in PCM Waveform (WAV) format which can be editing using any waveform audio editor such as [http://audacity.sourceforge.net/ Audacity]. [[Category:Files]] [[Category:Review]] 5aee17934fbbb2dc621f7f330365cd455551b2fa Source code documentation 0 80 934 933 2012-08-26T17:28:36Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Doxygen documentation is available for VDrift. Currently only the Subversion trunk is available. It is generated daily from the latest version of the [[Getting the development version|Development version]]. == Other versions == Doxygen output for the last release will be added soon. When new releases are made, documentation will be made available with the release. == Read Online == You can find [http://vdrift.net/doxygen/trunk/ Doxygen for VDrift trunk] at the following URL: http://vdrift.net/doxygen/trunk/ == Download == Downloadable PDF and Zip archives of the HTML version for offline browsing will be available soon. == Help improve documentation == If you are writing new code for VDrift, it would help to write comments using a format Doxygen can take advantage of. Here are a few handy links describing how to do that: * [http://www.stack.nl/~dimitri/doxygen/docblocks.html Doxygen Manual: Documenting Code] * [http://www.stack.nl/~dimitri/doxygen/commands.html Doxygen Manual: Command Reference] * [http://www.stack.nl/~dimitri/doxygen/manual.html Entire Doxygen Manual] [[Category:Development]] [[Category:Documenting]] [[Category:External Resources]] [[Category:Expand]] 5bc6208118f370bfdad9ead1960054672947d23b Testing 0 81 937 936 2012-08-26T17:28:36Z Timo 6 3 2 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki VDrift includes a very simple unit testing framework for C++ code. It is derived from [http://quicktest.sourceforge.net/ QuickTest]. ==Running the Tests== To run unit tests, the test executable must first be built. ===Building=== In the VDrift source root, run: scons test ===Executing=== The executable is called '''vdrift-test''' and is compiled to the '''build/''' directory in the root of the VDrift source tree. To run it, simply do: build/vdrift-test ===Results=== The results are written to STDOUT. An example: [-------------- RUNNING UNIT TESTS --------------] src/matrix4.cpp(26): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0) src/matrix4.cpp(27): 'matrix4_test' FAILED: value1 (10) should be close to value2 (20) src/matrix4.cpp(28): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (-1) src/matrix4.cpp(33): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0) src/matrix4.cpp(34): 'matrix4_test' FAILED: value1 (10) should be close to value2 (0) src/matrix4.cpp(35): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (1) Results: 29 succeeded, 1 failed [-------------- UNIT TESTS FINISHED -------------] ==Writing New Tests== Consult the [http://quicktest.sourceforge.net/usage.html QuickTest How to Use It] and the [http://quicktest.sourceforge.net/api.html QuickTest API Reference] for details on how to write unit tests using QuickTest. ===Example Tests=== To look at some example test code already in VDrift, look at '''src/*.cpp''' files which contain the macro <code>QT_TEST</code>. [[Category:Development]] [[Category:Expand]] f7fb8b7c67edf8279276e4e6cb950cb9e5035591 Tire parameters 0 82 946 945 2012-08-26T17:28:38Z Timo 6 3 8 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki Example '''carparts/tire/touring''' <pre> restitution = 0.1 tread = 0.25 rolling-resistance = 1.3e-2, 6.5e-6 # Lateral force a0=1.55 a1=-55 a2=1750 a3=1900 a4=7.2 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.65 b1=-110 b2=1800 b3=23.3 b4=410 b5=0.075 b6=0 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 # Aligning moment c0=2.2 c1=-4.3 c2=-4.4 c3=-1.9 c4=-9.6 c5=0.0225 c6=0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> Restitution defines tire restitution(not implemented atm). The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm There is a graphical tire parameters editor to adjust/review the parameters: http://svn.vdrift.net/viewvc.cgi [[Category:Cars]] [[Category:Files]] [[Category:Reformat]] e35173bccae2f31f542bbe3d13b1a797adb6eb6e Track modeling tutorial 0 83 956 955 2012-08-26T17:28:39Z Timo 6 3 9 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[3D modeling for game data]] 61cadf5dc3c605951325e0254b7f32bb4143451a Useful links 0 84 967 966 2012-08-26T17:28:40Z Timo 6 3 10 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki The VDrift community is an always expanding world of open source game developers, gamers on all platforms, artists and designers, and car tuners. It is based totally on the internet. The following links might be useful for users and developers of VDrift. ==VDrift== VDrift has several web sites devoted to the project and development. They are: * [http://vdrift.net/ Home] - The main project web site, includes news and forums, and general project information. * [http://cars.vdrift.net/ Cars] - VDrift cars database. * [http://vdrift.net/Forum/ Forum] - Discuss new features and development, report bugs and get help with problems in the forums. * [http://sourceforge.net/projects/vdrift SourceForge] - VDrift downloads are hosted on SourceForge, as well as the data repository. * [https://github.com/VDrift/vdrift GitHub] - This includes a public browser for the main VDrift Git tree, as well as HTTP access to the tree itself. * [http://wiki.vdrift.net/ Wiki] - The VDrift Wiki is the home of all the project's documentation. * [http://code.google.com/p/vdrift/issues/list Issue Tracker] - Tracks the fixing of bugs and implementing of new features. * [http://vdrift.net/staticpages/index.php?page=irc-chat Chat] - IRC channel used both for developer discussion and user support. If you have a problem or question feel free to stop by and ask. ==Driving Simulation Information== These are some links to general driving simulation information and communities: * Wikipedia: [http://en.wikipedia.org/wiki/Sim_racing Sim racing], [http://en.wikipedia.org/wiki/Racing_video_game Racing video game] - General information about simulated racing games. * [http://www.miata.net/sport/Physics/ Physics of Racing] - A series of articles about the physics of racing cars. * [http://www.cescg.org/CESCG-2003/SDeak/index.html Dynamical Simulation in a Driving Simulator] - A paper that addresses some important aspects of building a graphical model and a dynamical model for a driving simulator. * [http://www.racesimcentral.com/ Race Sim Central] - Racing simulation news and forums. * [http://www.racedepartment.com/content/ RaceDepartment] - Racing simulation community. ==Open Source Driving Simulators and Racing Games== Some more driving simulators: * [http://torcs.org/ The Open Race Car Simulator (TORCS)] - A car racing simulation focusing on AI racing and research. It can also be used as a ordinary car racing game too. * [http://sourceforge.net/projects/trigger-rally/ Trigger Rally] - A fast-paced open source rally racing game. * [http://vamos.sourceforge.net/ Vamos Automotive Simulator] - A automotive simulation framework with an emphasis on thorough physical modeling and good C++ design. It includes a real-time, first-person, 3D driving application. * [http://speed-dreams.sourceforge.net/ Speed Dreams] - A fork of the TORCS, aiming to implement exciting new features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as constantly improving visual and physics realism. * [http://supertuxkart.sourceforge.net/ Super TuxCart] - A free 3D kart racing game * [http://code.google.com/p/vdrift-ogre/ Stunt Rally] - A racing game that focuses on closed rally tracks with possible stunt elements (jumps, loops, pipes). It uses VDrift for car simulation. [[Category:External Resources]] 4533098cfa095e59bc9aa13417803a52f125a241 User settings directory 0 85 1020 1019 2012-08-26T17:31:01Z Timo 6 3 12 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki VDrift stores user settings (mostly in [[VDrift.config]]) and other information in a special directory on the computer's drive. Usually it is located within the user's personal assigned file space, to ensure that the user will have easy access to the files (for backup or other purposes), and that VDrift will be allowed write privileges to the directory. ==Location== The location of the settings directory is chosen based on the best location for the user's operating system. In the following subsections, ''username'' represents the user's login name on the computer. {| |- |'''Operating System''' |'''Location''' |- |Linux |<code>/home/''username''/.vdrift</code> |- |FreeBSD |<code>/home/''username''/.vdrift</code> |- |OS X |<code>/Users/''username''/Library/Preferences/VDrift</code> |- |Windows XP |<code>C:\Documents and Settings\''username''\My Documents\My Games\VDrift</code> |- |Windows Vista/7 |<code>C:\Users\''username''\My Documents\My Games\VDrift</code> |} {{note|If VDrift is run as root on Linux/FreeBSD, the root user's home directory is used instead, which is usually '''/root'''. It is not recommended that VDrift is run as root.}} {{note|If VDrift is run as Administrator on Windows XP, the path will be '''C:\Documents and Settings\Administrator\My Documents\My Games\VDrift'''. It is not recommended that VDrift is run as Administrator.}} [[Category:Files]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] d2067b5dfe596e8bdd76b547b433b8fabaefa96d Using SCons 0 86 1025 1024 2012-08-26T17:31:02Z Timo 6 3 4 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki {{update}} [http://scons.org/ SCons] is a replacement for autotools written in Python. {{note|Throughout the <code>scons</code> command will be used; if you are using scons-local that is distributed with VDrift you'll need to replace every instance of <code>scons</code> with <code>./scons.py</code>.}} ==Compile== To [[Compiling|compile VDrift]], simply run SCons. It reads the root level SCons configuration file, SConstruct, as well as the configuration files in subdirectories (called SConscript), when it is run to see what to do. scons SCons starts by checking your system for available libraries. If things go well, this will look something like this: you@yourcomputer:~/games/vdrift$ scons scons: Reading SConscript files ... Checking for main() in C library GL... yes Checking for main() in C library GLU... yes Checking for main() in C library openal... yes Checking for C++ header file SDL/SDL.h... yes Checking for C++ header file SDL/SDL_image.h... yes Checking for C++ header file SDL/SDL_net.h... yes scons: done reading SConscript files. Now, SCons will begin compiling VDrift, one file at a time, starting with the Vamos files and ending with linking the main executable. When changes to the source files are made, <code>scons</code> must be run again to update the build. ==Clean== When building a project it is sometimes necessary to "clean" a build (remove all files produced by the build). This can be done with the <code>-c</code> flag: scons -c All the object and binary executable files will be removed. Then when you run <code>scons</code> again, all the files will be rebuilt. ==Help== If you wish to list the options available at build time you may do so by executing <code>scons -h</code>. This will show all the available options, their default values, and their current values. ==Quiet== If you want SCons to give less verbose output when compiling use the <code>-Q</code> option. [[Category:Development]] [[Category:Update]] 164369a41cfc4a08b4769d2217a47d563c254397 VDrift 0 87 1027 1026 2012-08-26T17:31:02Z Timo 6 3 1 revision: Import from old wiki (on 15 May 2012) wikitext text/x-wiki #REDIRECT [[About the project]] 6c61d7d744ce2f6ce75dad897803487418dad12d VDrift.config 0 88 1039 1038 2012-08-26T17:31:04Z Timo 6 3 11 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki '''VDrift.config''' is the main user settings file for VDrift. It is in the [[configfile format]]. It is not the only file which VDrift uses for storing user settings (see also [[configuring the controls]]); however, it is the one which contains most of the settings important to users. VDrift does not use any kind of registry or configuration database. The options available to this configuration file are the ones defined in [[options.config]]. ==Location and Defaults== VDrift.config is located inside the [[user settings directory]]. The default '''VDrift.config''' is located in '''data/settings/VDrift.config'''. If VDrift fails to start, the next time it runs, it will move the user's current '''VDrift.config''' to '''VDrift.config.backup''' and make a new '''VDrift.config''' from the default one. ==Example== This is an example '''VDrift.config''' file. [control] autoclutch = true autotrans = true button_ramp = 5 mousegrab = true speed_sens_steering = 1 [display] FOV = 45 anisotropic = 0 antialiasing = 0 bloom = true camerabounce = 1 contrast = 1 depth = 16 fullscreen = true height = 1050 input_graph = true language = English lighting = 0 mph = true normalmaps = true racingline = true reflections = 1 shaders = true shadow_distance = 1 shadow_quality = 1 shadows = true show_fps = true show_hud = true skin = simple texture_size = medium trackmap = true view_distance = 1000 width = 1680 zdepth = 16 [game] ai_difficulty = 1 antilock = true camera_mode = chase number_of_laps = 1 opponent = XS opponent_color = 1,1,1 opponent_color_blue = 1.000000 opponent_color_green = 0.000000 opponent_color_red = 0.000000 opponent_paint = 00 player = XS player_color = 1,1,1 player_color_blue = 1.000000 player_color_green = 0.000000 player_color_red = 0.000000 player_paint = 00 record = false reverse = false selected_replay = 0 track = paulricard88 traction_control = true [joystick] calibrated = false ff_device = /dev/input/event0 ff_gain = 2 ff_invert = false hgateshifter = false two_hundred = false type = joystick ==Options== ===Control section=== For information on the Control settings, see [[Configuring the controls]]. ===Display section=== See [[Configuring the display]] for detailed descriptions of each option. ===Game section=== See [[Starting the game]] for detailed descriptions of each option. ===Joystick section=== For information on the Joystick settings, see [[Configuring the controls]]. ===Sound section=== See [[Configuring the sound]] for more information. [[Category:Files]] [[Category:Configuration]] c61bf3dfff5c5ea6ee1cc0688294759265cc675e Wiki usage notes 0 89 1051 1050 2012-08-26T17:31:06Z Timo 6 3 11 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki This article intends to give an idea of how to get the most out of this wiki site. ==Write!== The success of a site like this depends on its contributors. If you see a mistake, no matter how small, edit the article and fix it. If you know that something is missing, please write about it, and if you don't know enough put something in the article reminding others to add this information. ==Discussion pages== Each article has a discussion page. Use this page to ask questions or suggest changes to a page. For instance, if you're not sure if something is right or not, and want to make sure before editing yourself, the discussion page is ideal. Likewise if there is something missing from a page that you don't know much about, the discussion page is a good place to put in the request. Don't hesitate to use these, and don't forget to sign your username. ==New articles== If you'd like to create a new article and aren't sure where to put it, just give it a general name. We can always move or reorganize pages later. It's better to get the information down and worry about the details later. When adding a new article, put something in the notes telling where you got the information (for instance if you copied it from somewhere else). ==Editing articles== When possible, edit only the section that you'd like to change, rather than the whole article. This makes it less likely for two authors to be editing the same page at the same time. This also makes changes more atomic, and the section name is automatically added to the article editing summary, which makes it easier to see what part of the article was changed. On the topic of summaries, please try to remember to add a summary whenever editing an article. It is somewhat annoying to have to check the diffs every time someone makes an edit. Just a few words will do, like "fixed spelling of 'pulchritudinous'" or "restructured for better flow". To help keep the notes simple, its best to also keep the edits simple. Don't try to totally rewrite an article in one edit, unless it's very short. If there's a logical way to break up the edits do so. ==General tips== ===Notes=== If there's something you'd like to draw the reader's attention to, you can use the note template. Here's an example of how to use it: <nowiki>{{note|Notes are hard to miss}}</nowiki> This is what it will look like: {{note|Notes are hard to miss.}} ===Sections=== Articles can be split into sections with sub-sections. The wiki generates a nice table of contents by the sections. To make a top-level section, put the section name between a set of double equal signs, like this: ==Overview== A section of this would have one more equal sign on each side: ===Sub-section 1=== There may be sub-sub sections, and sub-sub-sub sections, and so on. Don't get too carried away... ===Links=== The wiki generates links automatically in many cases. To link to something on an external site, use single brackets, with the URL first, followed by the link text, like this: <nowiki>[http://vdrift.net/ VDrift]</nowiki> To put a raw URL in an article, simply insert it without any brackets, it will automatically be turned into a link. To make internal links, simply put the page's name in double square brackets. You don't have to put in any underscores as are added to the URL of the page. Here's a link to this page: <nowiki>[[Wiki usage notes]]</nowiki> To give a link of this nature a different link text, add a pipe character ("|") after the page name, and then put the link text: <nowiki>[[Wiki usage notes|Notes on using the wiki]]</nowiki> ===Unwritten pages=== If there's a topic that really deserves its own article, but there is no information on the wiki about it yet, just add a link to the article where it should go. This will encourage others to write the page. <nowiki>We really need a [[Car modeling tutorial]].</nowiki> ===Code blocks=== The wiki makes it very simple to add blocks of pre-formatted text. Simply add a space before the lines which should be part of the code block. ===Talking about files=== When referencing file or directory names, it is important to set them apart from the other text so that the reader doesn't confuse sentence punctuation and other words with the directory or file name. The best way to address this is to make the text bold, by adding three apostrophes before and after the text: <nowiki>VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''.</nowiki> ==Nevertheless== If you feel like you don't understand the above guidelines, don't worry about them too much. Go ahead and write your article or fix another, someone will probably clean it up later if there are mistakes or areas for improvement. [[Category:Documenting]] [[Category:Review]] 02c6c2e7fbfa868d6ebab3c59d6f1d2c32f9629b 1113 1051 2012-08-26T19:38:11Z Timo 6 3 Redirect to Help:Editing wikitext text/x-wiki #REDIRECT [[Help:Editing]] 67f3e0ea822ae91acaae50b954b69826e42f37f8 Working with the development version 0 90 1098 1097 2012-08-26T17:31:11Z Timo 6 3 46 revisions: Import from old wiki (on 15 May 2012) wikitext text/x-wiki See this documentation for more info: http://help.github.com/ ===Making your own changes=== If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repo on GitHub (https://github.com/VDrift/vdrift/). Just click the button near the top right of the page. You will need a free GitHub account. Then clone your new repo onto your computer: git clone git@github.com:''username''/vdrift.git And link this to the original VDrift repo: git remote add upstream git://github.com/VDrift/vdrift.git git fetch upstream ===Updating=== Once the repository has been checked out, it can be updated without downloading the entire thing again. For command line git, use the command git pull to check for updates and apply them. If you have made some changes, use the following instead to prevent these being lost: git fetch upstream git merge upstream/master ===Uploading changes=== To upload any changes you've made, first add the files to the commit: git add ''filename'' Then do the commit: git commit -m 'Commit message' And finally send this to GitHub: git push origin master ===Checking in changes=== You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/ Thank you for helping make VDrift better for everyone! [[Category:Development]] [[Category:Review]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 70574d1590d11cbfd4e7ed04de6cf716592efc88 Main Page 0 1 1099 646 2012-08-26T18:18:33Z Venzon 1 wikitext text/x-wiki [[Image:vdrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General Info|General Info]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Contributing]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding Guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modelling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} d79513b149ff1d58bea091f968d029bca4d03e8e 1112 1099 2012-08-26T19:35:37Z Timo 6 3 Readd Reporting problems wikitext text/x-wiki [[Image:vdrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General Info|General Info]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Contributing]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding Guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modelling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} d38d58d3ddf03c41bb2fb6b7f558b5e135455847 VDrift:Copyrights 4 91 1100 2012-08-26T18:41:29Z Timo 6 3 GNU Free Documentation License 1.3 wikitext text/x-wiki All documentation on this wiki is released under the [http://www.gnu.org/copyleft/fdl.html GNU Free Documentation License 1.3]. ==FDL== GNU Free Documentation License Version 1.3, 3 November 2008 Copyright (C) 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. 0. PREAMBLE The purpose of this License is to make a manual, textbook, or other functional and useful document "free" in the sense of freedom: to assure everyone the effective freedom to copy and redistribute it, with or without modifying it, either commercially or noncommercially. Secondarily, this License preserves for the author and publisher a way to get credit for their work, while not being considered responsible for modifications made by others. This License is a kind of "copyleft", which means that derivative works of the document must themselves be free in the same sense. It complements the GNU General Public License, which is a copyleft license designed for free software. We have designed this License in order to use it for manuals for free software, because free software needs free documentation: a free program should come with manuals providing the same freedoms that the software does. But this License is not limited to software manuals; it can be used for any textual work, regardless of subject matter or whether it is published as a printed book. We recommend this License principally for works whose purpose is instruction or reference. 1. APPLICABILITY AND DEFINITIONS This License applies to any manual or other work, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law. A "Modified Version" of the Document means any work containing the Document or a portion of it, either copied verbatim, or with modifications and/or translated into another language. A "Secondary Section" is a named appendix or a front-matter section of the Document that deals exclusively with the relationship of the publishers or authors of the Document to the Document's overall subject (or to related matters) and contains nothing that could fall directly within that overall subject. (Thus, if the Document is in part a textbook of mathematics, a Secondary Section may not explain any mathematics.) The relationship could be a matter of historical connection with the subject or with related matters, or of legal, commercial, philosophical, ethical or political position regarding them. The "Invariant Sections" are certain Secondary Sections whose titles are designated, as being those of Invariant Sections, in the notice that says that the Document is released under this License. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none. The "Cover Texts" are certain short passages of text that are listed, as Front-Cover Texts or Back-Cover Texts, in the notice that says that the Document is released under this License. A Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words. A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document straightforwardly with generic text editors or (for images composed of pixels) generic paint programs or (for drawings) some widely available drawing editor, and that is suitable for input to text formatters or for automatic translation to a variety of formats suitable for input to text formatters. A copy made in an otherwise Transparent file format whose markup, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. A copy that is not "Transparent" is called "Opaque". Examples of suitable formats for Transparent copies include plain ASCII without markup, Texinfo input format, LaTeX input format, SGML or XML using a publicly available DTD, and standard-conforming simple HTML, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include proprietary formats that can be read and edited only by proprietary word processors, SGML or XML for which the DTD and/or processing tools are not generally available, and the machine-generated HTML, PostScript or PDF produced by some word processors for output purposes only. The "Title Page" means, for a printed book, the title page itself, plus such following pages as are needed to hold, legibly, the material this License requires to appear in the title page. For works in formats which do not have any title page as such, "Title Page" means the text near the most prominent appearance of the work's title, preceding the beginning of the body of the text. The "publisher" means any person or entity that distributes copies of the Document to the public. A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition. The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License. 2. VERBATIM COPYING You may copy and distribute the Document in any medium, either commercially or noncommercially, provided that this License, the copyright notices, and the license notice saying this License applies to the Document are reproduced in all copies, and that you add no other conditions whatsoever to those of this License. You may not use technical measures to obstruct or control the reading or further copying of the copies you make or distribute. However, you may accept compensation in exchange for copies. If you distribute a large enough number of copies you must also follow the conditions in section 3. You may also lend copies, under the same conditions stated above, and you may publicly display copies. 3. COPYING IN QUANTITY If you publish printed copies (or copies in media that commonly have printed covers) of the Document, numbering more than 100, and the Document's license notice requires Cover Texts, you must enclose the copies in covers that carry, clearly and legibly, all these Cover Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover. Both covers must also clearly and legibly identify you as the publisher of these copies. The front cover must present the full title with all words of the title equally prominent and visible. You may add other material on the covers in addition. Copying with changes limited to the covers, as long as they preserve the title of the Document and satisfy these conditions, can be treated as verbatim copying in other respects. If the required texts for either cover are too voluminous to fit legibly, you should put the first ones listed (as many as fit reasonably) on the actual cover, and continue the rest onto adjacent pages. If you publish or distribute Opaque copies of the Document numbering more than 100, you must either include a machine-readable Transparent copy along with each Opaque copy, or state in or with each Opaque copy a computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. If you use the latter option, you must take reasonably prudent steps, when you begin distribution of Opaque copies in quantity, to ensure that this Transparent copy will remain thus accessible at the stated location until at least one year after the last time you distribute an Opaque copy (directly or through your agents or retailers) of that edition to the public. It is requested, but not required, that you contact the authors of the Document well before redistributing any large number of copies, to give them a chance to provide you with an updated version of the Document. 4. MODIFICATIONS You may copy and distribute a Modified Version of the Document under the conditions of sections 2 and 3 above, provided that you release the Modified Version under precisely this License, with the Modified Version filling the role of the Document, thus licensing distribution and modification of the Modified Version to whoever possesses a copy of it. In addition, you must do these things in the Modified Version: A. Use in the Title Page (and on the covers, if any) a title distinct from that of the Document, and from those of previous versions (which should, if there were any, be listed in the History section of the Document). You may use the same title as a previous version if the original publisher of that version gives permission. B. List on the Title Page, as authors, one or more persons or entities responsible for authorship of the modifications in the Modified Version, together with at least five of the principal authors of the Document (all of its principal authors, if it has fewer than five), unless they release you from this requirement. C. State on the Title page the name of the publisher of the Modified Version, as the publisher. D. Preserve all the copyright notices of the Document. E. Add an appropriate copyright notice for your modifications adjacent to the other copyright notices. F. Include, immediately after the copyright notices, a license notice giving the public permission to use the Modified Version under the terms of this License, in the form shown in the Addendum below. G. Preserve in that license notice the full lists of Invariant Sections and required Cover Texts given in the Document's license notice. H. Include an unaltered copy of this License. I. Preserve the section Entitled "History", Preserve its Title, and add to it an item stating at least the title, year, new authors, and publisher of the Modified Version as given on the Title Page. If there is no section Entitled "History" in the Document, create one stating the title, year, authors, and publisher of the Document as given on its Title Page, then add an item describing the Modified Version as stated in the previous sentence. J. Preserve the network location, if any, given in the Document for public access to a Transparent copy of the Document, and likewise the network locations given in the Document for previous versions it was based on. These may be placed in the "History" section. You may omit a network location for a work that was published at least four years before the Document itself, or if the original publisher of the version it refers to gives permission. K. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, and preserve in the section all the substance and tone of each of the contributor acknowledgements and/or dedications given therein. L. Preserve all the Invariant Sections of the Document, unaltered in their text and in their titles. Section numbers or the equivalent are not considered part of the section titles. M. Delete any section Entitled "Endorsements". Such a section may not be included in the Modified Version. N. Do not retitle any existing section to be Entitled "Endorsements" or to conflict in title with any Invariant Section. O. Preserve any Warranty Disclaimers. If the Modified Version includes new front-matter sections or appendices that qualify as Secondary Sections and contain no material copied from the Document, you may at your option designate some or all of these sections as invariant. To do this, add their titles to the list of Invariant Sections in the Modified Version's license notice. These titles must be distinct from any other section titles. You may add a section Entitled "Endorsements", provided it contains nothing but endorsements of your Modified Version by various parties--for example, statements of peer review or that the text has been approved by an organization as the authoritative definition of a standard. You may add a passage of up to five words as a Front-Cover Text, and a passage of up to 25 words as a Back-Cover Text, to the end of the list of Cover Texts in the Modified Version. Only one passage of Front-Cover Text and one of Back-Cover Text may be added by (or through arrangements made by) any one entity. If the Document already includes a cover text for the same cover, previously added by you or by arrangement made by the same entity you are acting on behalf of, you may not add another; but you may replace the old one, on explicit permission from the previous publisher that added the old one. The author(s) and publisher(s) of the Document do not by this License give permission to use their names for publicity for or to assert or imply endorsement of any Modified Version. 5. COMBINING DOCUMENTS You may combine the Document with other documents released under this License, under the terms defined in section 4 above for modified versions, provided that you include in the combination all of the Invariant Sections of all of the original documents, unmodified, and list them all as Invariant Sections of your combined work in its license notice, and that you preserve all their Warranty Disclaimers. The combined work need only contain one copy of this License, and multiple identical Invariant Sections may be replaced with a single copy. If there are multiple Invariant Sections with the same name but different contents, make the title of each such section unique by adding at the end of it, in parentheses, the name of the original author or publisher of that section if known, or else a unique number. Make the same adjustment to the section titles in the list of Invariant Sections in the license notice of the combined work. In the combination, you must combine any sections Entitled "History" in the various original documents, forming one section Entitled "History"; likewise combine any sections Entitled "Acknowledgements", and any sections Entitled "Dedications". You must delete all sections Entitled "Endorsements". 6. COLLECTIONS OF DOCUMENTS You may make a collection consisting of the Document and other documents released under this License, and replace the individual copies of this License in the various documents with a single copy that is included in the collection, provided that you follow the rules of this License for verbatim copying of each of the documents in all other respects. You may extract a single document from such a collection, and distribute it individually under this License, provided you insert a copy of this License into the extracted document, and follow this License in all other respects regarding verbatim copying of that document. 7. AGGREGATION WITH INDEPENDENT WORKS A compilation of the Document or its derivatives with other separate and independent documents or works, in or on a volume of a storage or distribution medium, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which are not themselves derivative works of the Document. If the Cover Text requirement of section 3 is applicable to these copies of the Document, then if the Document is less than one half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket the whole aggregate. 8. TRANSLATION Translation is considered a kind of modification, so you may distribute translations of the Document under the terms of section 4. Replacing Invariant Sections with translations requires special permission from their copyright holders, but you may include translations of some or all Invariant Sections in addition to the original versions of these Invariant Sections. You may include a translation of this License, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail. If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title. 9. TERMINATION You may not copy, modify, sublicense, or distribute the Document except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, or distribute it is void, and will automatically terminate your rights under this License. However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, receipt of a copy of some or all of the same material does not give you any rights to use it. 10. FUTURE REVISIONS OF THIS LICENSE The Free Software Foundation may publish new, revised versions of the GNU Free Documentation License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. See http://www.gnu.org/copyleft/. Each version of the License is given a distinguishing version number. If the Document specifies that a particular numbered version of this License "or any later version" applies to it, you have the option of following the terms and conditions either of that specified version or of any later version that has been published (not as a draft) by the Free Software Foundation. If the Document does not specify a version number of this License, you may choose any version ever published (not as a draft) by the Free Software Foundation. If the Document specifies that a proxy can decide which future versions of this License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Document. 11. RELICENSING "Massive Multiauthor Collaboration Site" (or "MMC Site") means any World Wide Web server that publishes copyrightable works and also provides prominent facilities for anybody to edit those works. A public wiki that anybody can edit is an example of such a server. A "Massive Multiauthor Collaboration" (or "MMC") contained in the site means any set of copyrightable works thus published on the MMC site. "CC-BY-SA" means the Creative Commons Attribution-Share Alike 3.0 license published by Creative Commons Corporation, a not-for-profit corporation with a principal place of business in San Francisco, California, as well as future copyleft versions of that license published by that same organization. "Incorporate" means to publish or republish a Document, in whole or in part, as part of another Document. An MMC is "eligible for relicensing" if it is licensed under this License, and if all works that were first published under this License somewhere other than this MMC, and subsequently incorporated in whole or in part into the MMC, (1) had no cover texts or invariant sections, and (2) were thus incorporated prior to November 1, 2008. The operator of an MMC Site may republish an MMC contained in the site under CC-BY-SA on the same site at any time before August 1, 2009, provided the MMC is eligible for relicensing. ADDENDUM: How to use this License for your documents To use this License in a document you have written, include a copy of the License in the document and put the following copyright and license notices just after the title page: Copyright (c) YEAR YOUR NAME. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license is included in the section entitled "GNU Free Documentation License". If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts, replace the "with...Texts." line with this: with the Invariant Sections being LIST THEIR TITLES, with the Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. If you have Invariant Sections without Cover Texts, or some other combination of the three, merge those two alternatives to suit the situation. If your document contains nontrivial examples of program code, we recommend releasing these examples in parallel under your choice of free software license, such as the GNU General Public License, to permit their use in free software. 3d051333c88077947b5f8cf8e4442a8d9c0003f0 Help:Editing 12 92 1101 2012-08-26T18:50:47Z Timo 6 3 Editing guidelines (based on Wiki usage notes) wikitext text/x-wiki This article intends to give an idea of how to help improve this wiki. To see what needs to be done, see the [[Project:Todo|todo list]]. ==Write!== The success of a site like this depends on its contributors. If you see a mistake, no matter how small, edit the article and fix it. If you know that something is missing, please write about it, and if you don't know enough put something on the discussion page reminding others to add this information. ==Discussion pages== Each article has a discussion page. Use this page to ask questions or suggest changes to a page. For instance, if you're not sure if something is right or not, and want to make sure before editing yourself, the discussion page is ideal. Likewise if there is something missing from a page that you don't know much about, the discussion page is a good place to put in the request. Don't hesitate to use these, and don't forget to sign your username with '''<nowiki>-~~~~</nowiki>'''. ==New articles== If you'd like to create a new article and aren't sure where to put it, just give it a general name. We can always move or reorganize pages later. It's better to get the information down and worry about the details later. When adding a new article, put something in the notes telling where you got the information (for instance if you copied it from somewhere else). ==Editing articles== When possible, edit only the section that you'd like to change, rather than the whole article. This makes it less likely for two authors to be editing the same page at the same time. This also makes changes more atomic, and the section name is automatically added to the article editing summary, which makes it easier to see what part of the article was changed. On the topic of summaries, please try to remember to add a summary whenever editing an article. It is somewhat annoying to have to check the diffs every time someone makes an edit. Just a few words will do, like "fixed spelling of 'pulchritudinous'" or "restructured for better flow". To help keep the summaries simple, its best to also keep the edits simple. Don't try to totally rewrite an article in one edit, unless it's very short. If there's a logical way to break up the edits do so. ==Formating== For detailed notes on the syntax for formatting the wiki, see http://www.mediawiki.org/wiki/Help:Formatting. The following gives some instructions on our preferred style for certain things. ===Notes=== If there's something you'd like to draw the reader's attention to, you can use the note template. Here's an example of how to use it: <nowiki>{{note|Notes are hard to miss}}</nowiki> {{note|Notes are hard to miss.}} ===Sections=== Articles can be split into sections with sub-sections. If there are more than 3 sections the wiki generates a nice table of contents. To make a top-level section, put the section name between a set of double equal signs, like this: ==Overview== A section of this would have one more equal sign on each side: ===Sub-section 1=== See examples on this page: [[Help:Editing#Formating|Formating]], [[Help:Editing#Sections|Sections]]. There may be sub-sub sections, and sub-sub-sub sections, and so on. Don't get too carried away... ===Links=== The wiki generates links automatically in many cases. To link to something on an external site, use single brackets, with the URL first, followed by the link text, like this: <nowiki>[http://vdrift.net/ VDrift]</nowiki> [http://vdrift.net/ VDrift] To put a raw URL in an article, simply insert it without any brackets, it will automatically be turned into a link. <nowiki>http://vdrift.net/</nowiki> http://vdrift.net/ To make internal links, simply put the page's name in double square brackets. You don't have to put in any underscores as are added to the URL of the page. Here's a link to this page: <nowiki>[[Contribution]]</nowiki> [[Contribution]] To give a link of this nature a different link text, add a pipe character ("|") after the page name, and then put the link text: <nowiki>[[VDrift Wiki:About|About the wiki]]</nowiki> [[VDrift Wiki:About|About the wiki]] ===Unwritten pages=== If there's a topic that really deserves its own article, but there is no information on the wiki about it yet, just add a link to the article where it should go. This will encourage others to write the page. <nowiki>We really need a [[Time machine]].</nowiki> We really need a [[Time machine]]. ===Code blocks=== The wiki makes it very simple to add blocks of pre-formatted text. Simply add a space before the lines which should be part of the code block. <nowiki> cd vdrift</nowiki> See above for an example! ===Talking about files=== When referencing file or directory names, it is important to set them apart from the other text so that the reader doesn't confuse sentence punctuation and other words with the directory or file name. The best way to address this is to make the text bold, by adding three apostrophes before and after the text: <nowiki>VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''.</nowiki> VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''. ===Menu items=== When talking about menus items, to reduce the number of words you have to write, just use arrows in between the items: Go to File -> Insert -> Image. Go to File -> Insert -> Image. ===Buttons=== When talking about buttons, put quotation marks around them: Click "Updates" then "Manage Cars". Click "Updates" then "Manage Cars". ===Collapsible sections=== If a page is getting very long, and has sections only relevant people (for example only Linux users), consider using collapsible sections by using the following code: <nowiki><div class="mw-collapsible mw-collapsed"> //Delete mw-collapsed to make the section start expanded. Title(optional) <div class="mw-collapsible-content"> Content </div></div></nowiki> <div class="mw-collapsible mw-collapsed"> Title (optional) <div class="mw-collapsible-content"> Content </div></div> ==Nevertheless== If you feel like you don't understand the above guidelines, don't worry about them too much. Go ahead and write your article or fix another, someone will probably clean it up later if there are mistakes or areas for improvement. 5b9275b1f0a3fe096859db1cdd6b4ce1309df312 1106 1101 2012-08-26T19:16:19Z Timo 6 3 Fix signature code wikitext text/x-wiki This article intends to give an idea of how to help improve this wiki. To see what needs to be done, see the [[Project:Todo|todo list]]. ==Write!== The success of a site like this depends on its contributors. If you see a mistake, no matter how small, edit the article and fix it. If you know that something is missing, please write about it, and if you don't know enough put something on the discussion page reminding others to add this information. ==Discussion pages== Each article has a discussion page. Use this page to ask questions or suggest changes to a page. For instance, if you're not sure if something is right or not, and want to make sure before editing yourself, the discussion page is ideal. Likewise if there is something missing from a page that you don't know much about, the discussion page is a good place to put in the request. Don't hesitate to use these, and don't forget to sign your username with '''<nowiki>--~~~~</nowiki>'''. ==New articles== If you'd like to create a new article and aren't sure where to put it, just give it a general name. We can always move or reorganize pages later. It's better to get the information down and worry about the details later. When adding a new article, put something in the notes telling where you got the information (for instance if you copied it from somewhere else). ==Editing articles== When possible, edit only the section that you'd like to change, rather than the whole article. This makes it less likely for two authors to be editing the same page at the same time. This also makes changes more atomic, and the section name is automatically added to the article editing summary, which makes it easier to see what part of the article was changed. On the topic of summaries, please try to remember to add a summary whenever editing an article. It is somewhat annoying to have to check the diffs every time someone makes an edit. Just a few words will do, like "fixed spelling of 'pulchritudinous'" or "restructured for better flow". To help keep the summaries simple, its best to also keep the edits simple. Don't try to totally rewrite an article in one edit, unless it's very short. If there's a logical way to break up the edits do so. ==Formating== For detailed notes on the syntax for formatting the wiki, see http://www.mediawiki.org/wiki/Help:Formatting. The following gives some instructions on our preferred style for certain things. ===Notes=== If there's something you'd like to draw the reader's attention to, you can use the note template. Here's an example of how to use it: <nowiki>{{note|Notes are hard to miss}}</nowiki> {{note|Notes are hard to miss.}} ===Sections=== Articles can be split into sections with sub-sections. If there are more than 3 sections the wiki generates a nice table of contents. To make a top-level section, put the section name between a set of double equal signs, like this: ==Overview== A section of this would have one more equal sign on each side: ===Sub-section 1=== See examples on this page: [[Help:Editing#Formating|Formating]], [[Help:Editing#Sections|Sections]]. There may be sub-sub sections, and sub-sub-sub sections, and so on. Don't get too carried away... ===Links=== The wiki generates links automatically in many cases. To link to something on an external site, use single brackets, with the URL first, followed by the link text, like this: <nowiki>[http://vdrift.net/ VDrift]</nowiki> [http://vdrift.net/ VDrift] To put a raw URL in an article, simply insert it without any brackets, it will automatically be turned into a link. <nowiki>http://vdrift.net/</nowiki> http://vdrift.net/ To make internal links, simply put the page's name in double square brackets. You don't have to put in any underscores as are added to the URL of the page. Here's a link to this page: <nowiki>[[Contribution]]</nowiki> [[Contribution]] To give a link of this nature a different link text, add a pipe character ("|") after the page name, and then put the link text: <nowiki>[[VDrift Wiki:About|About the wiki]]</nowiki> [[VDrift Wiki:About|About the wiki]] ===Unwritten pages=== If there's a topic that really deserves its own article, but there is no information on the wiki about it yet, just add a link to the article where it should go. This will encourage others to write the page. <nowiki>We really need a [[Time machine]].</nowiki> We really need a [[Time machine]]. ===Code blocks=== The wiki makes it very simple to add blocks of pre-formatted text. Simply add a space before the lines which should be part of the code block. <nowiki> cd vdrift</nowiki> See above for an example! ===Talking about files=== When referencing file or directory names, it is important to set them apart from the other text so that the reader doesn't confuse sentence punctuation and other words with the directory or file name. The best way to address this is to make the text bold, by adding three apostrophes before and after the text: <nowiki>VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''.</nowiki> VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''. ===Menu items=== When talking about menus items, to reduce the number of words you have to write, just use arrows in between the items: Go to File -> Insert -> Image. Go to File -> Insert -> Image. ===Buttons=== When talking about buttons, put quotation marks around them: Click "Updates" then "Manage Cars". Click "Updates" then "Manage Cars". ===Collapsible sections=== If a page is getting very long, and has sections only relevant people (for example only Linux users), consider using collapsible sections by using the following code: <nowiki><div class="mw-collapsible mw-collapsed"> //Delete mw-collapsed to make the section start expanded. Title(optional) <div class="mw-collapsible-content"> Content </div></div></nowiki> <div class="mw-collapsible mw-collapsed"> Title (optional) <div class="mw-collapsible-content"> Content </div></div> ==Nevertheless== If you feel like you don't understand the above guidelines, don't worry about them too much. Go ahead and write your article or fix another, someone will probably clean it up later if there are mistakes or areas for improvement. e9d8d3cd5b5cb218e37244d68d969fdd25947a5f VDrift:About 4 93 1102 2012-08-26T18:52:26Z Timo 6 3 Page about the wiki itself wikitext text/x-wiki This wiki is used for creating, maintaining and distributing documentation of [http://vdrift.net VDrift]. ==License== All documentation on this wiki is released under the '''GNU Free Documentation License 1.3''' (see [[Project:Copyrights|Copyrights]] for details). ==Contribution== Everyone interested in the VDrift project is invited to contribute to this wiki. Please see the [[Help:Editing|editing instructions]] for more information. To see what needs to be done to the wiki, see the [[Project:Todo|todo list]]. a17f00c969784cf89ad59826ff5352e47576e1fd Template:Note 10 94 1103 2012-08-26T19:08:16Z Timo 6 3 Import from old wiki wikitext text/x-wiki {| cellpadding="4" |style="background-color: #e0ff00; border: solid 1px red;"| '''Note:''' {{{1}}} |} 38b3a1e25e1d2018313dabcbdf3c169611b8e8b0 1104 1103 2012-08-26T19:09:31Z Timo 6 3 Smaller border wikitext text/x-wiki {| cellpadding="4" | style="background-color: #e0ff00; border: solid 1px red;" | '''Note:''' {{{1}}} |} e1babebce8eac99752496b2774df01590d13ddef Authors and contributors 0 6 1105 66 2012-08-26T19:11:58Z Timo 6 3 Remove duplication, and update a few links wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page, or post in the forums.}} ==Authors== VDrift was created by [http://vdrift.net/Forum/member.php?action=profile&uid=1 Joe Venzon] who continues to fix bugs in the game, as well as writing new subsystems and maintaining old ones. Joe created everything in VDrift which is not attributed to someone else below. The physics engine in the game was originally [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. As time went on it underwent many modifications. Now, the physics system has been rewritten. ==Current Contributors== ===Code=== * [http://vdrift.net/Forum/member.php?action=profile&uid=4879] has rewritten the physics code, added car color selection, implemented multi-language menus, and continues to fix bugs and add new features. * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, much of the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. Chris is currently working on a driver training system with evaluation of driving behavior and driver feedback. * [http://vdrift.net/users.php?mode=profile&uid=1435 Francis Whittle] has improved the car suspension by adding new types of suspension. * [http://vdrift.net/users.php?mode=profile&uid=5534 Antonio Caiazzo] is working on a new AI system based on neural networks. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Tracks==== * [http://vdrift.net/users.php?mode=profile&uid=412 alex25] has imported most of the tracks from various sources, and helped maintain them over time. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=1337 Ny Dedes] TC6, LE, and is working on a new car, the ATT. also modeled the driver, and coded the mesh generation for tires and brake rotors. * [http://vdrift.net/users.php?mode=profile&uid=3407 Timothy Porter] is working on preparing freely-licensed car models for import, and polishing the track Rouen. ===Ports=== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] maintains the VDrift port for Mac OS X. * [http://vdrift.net/Forum/member.php?action=profile&uid=2097 Timothy Furlong] helps maintain the VDrift port for Mac OS X and has helped to update and expand wiki pages. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] maintains the VDrift port for FreeBSD. ==Former Contributors== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * [http://vdrift.net/users.php?mode=profile&uid=755 rookie1] wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=5095 MirceaKitsune] contributed new skins for several cars, and several patches including adding reverse lights, sounds for gear, brake and handbrake, and a new car coloring implementation with adapted skins. * [http://vdrift.net/users.php?mode=profile&uid=710 cotharyus] improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helped with testing and debugging, worked on Debian GNU/Linux packaging, and improved the build system. * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] packaged VDrift for Slackware Linux and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=1356 Gonéri Le Bouder] worked on Debian GNU/Linux packaging and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] managed the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added the first version of internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. * [http://vdrift.net/users.php?mode=profile&uid=769 pwp71] helped maintain track data when new features became available. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 Tyler Fric] created the 360. [[Category:General Info]] ee2cb6d3facec7db0ab04e48b98d22fa5bc437d3 1108 1105 2012-08-26T19:17:09Z Timo 6 3 Fix NaN's link wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page, or post in the forums.}} ==Authors== VDrift was created by [http://vdrift.net/Forum/member.php?action=profile&uid=1 Joe Venzon] who continues to fix bugs in the game, as well as writing new subsystems and maintaining old ones. Joe created everything in VDrift which is not attributed to someone else below. The physics engine in the game was originally [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. As time went on it underwent many modifications. Now, the physics system has been rewritten. ==Current Contributors== ===Code=== * [http://vdrift.net/Forum/member.php?action=profile&uid=4879 NaN] has rewritten the physics code, added car color selection, implemented multi-language menus, and continues to fix bugs and add new features. * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, much of the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. Chris is currently working on a driver training system with evaluation of driving behavior and driver feedback. * [http://vdrift.net/users.php?mode=profile&uid=1435 Francis Whittle] has improved the car suspension by adding new types of suspension. * [http://vdrift.net/users.php?mode=profile&uid=5534 Antonio Caiazzo] is working on a new AI system based on neural networks. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Tracks==== * [http://vdrift.net/users.php?mode=profile&uid=412 alex25] has imported most of the tracks from various sources, and helped maintain them over time. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=1337 Ny Dedes] TC6, LE, and is working on a new car, the ATT. also modeled the driver, and coded the mesh generation for tires and brake rotors. * [http://vdrift.net/users.php?mode=profile&uid=3407 Timothy Porter] is working on preparing freely-licensed car models for import, and polishing the track Rouen. ===Ports=== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] maintains the VDrift port for Mac OS X. * [http://vdrift.net/Forum/member.php?action=profile&uid=2097 Timothy Furlong] helps maintain the VDrift port for Mac OS X and has helped to update and expand wiki pages. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] maintains the VDrift port for FreeBSD. ==Former Contributors== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * [http://vdrift.net/users.php?mode=profile&uid=755 rookie1] wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=5095 MirceaKitsune] contributed new skins for several cars, and several patches including adding reverse lights, sounds for gear, brake and handbrake, and a new car coloring implementation with adapted skins. * [http://vdrift.net/users.php?mode=profile&uid=710 cotharyus] improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helped with testing and debugging, worked on Debian GNU/Linux packaging, and improved the build system. * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] packaged VDrift for Slackware Linux and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=1356 Gonéri Le Bouder] worked on Debian GNU/Linux packaging and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] managed the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added the first version of internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. * [http://vdrift.net/users.php?mode=profile&uid=769 pwp71] helped maintain track data when new features became available. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 Tyler Fric] created the 360. [[Category:General Info]] 0f3ad47ddbdd8dcaacedafc0504c3947b83bdd46 Talk:Authors and contributors 1 95 1107 2012-08-26T19:16:32Z Timo 6 3 Created page with "All the links are broken since the new forum: ;old style :http://vdrift.net/users.php?mode=profile&uid=4 ;new style :http://vdrift.net/Forum/member.php?action=profile&uid=1 bu..." wikitext text/x-wiki All the links are broken since the new forum: ;old style :http://vdrift.net/users.php?mode=profile&uid=4 ;new style :http://vdrift.net/Forum/member.php?action=profile&uid=1 but the uids have changed :( --[[User:Timo 6|Timo 6]] ([[User talk:Timo 6|talk]]) 12:16, 26 August 2012 (PDT) f8955ff2ff7bc08843a0a8afee06e0c2fdd8c7b6 VDrift:Todo 4 96 1109 2012-08-26T19:18:43Z Timo 6 3 Created page with "* Fix links on [[Authors and contributors]]" wikitext text/x-wiki * Fix links on [[Authors and contributors]] bfc06a0dc1eab8137ec7fd8988ee4290c056f37a License 0 49 1110 570 2012-08-26T19:20:05Z Timo 6 3 wikitext text/x-wiki VDrift is released under the [http://www.gnu.org/licenses/gpl.html GNU General Public License 3]. ==GPL== GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. [[Category:General Info]] 794618d86594b738aa9cd6a180e8856923bb52f8 Requirements 0 97 1114 2012-08-26T19:58:39Z Timo 6 3 Combine software and hardware requirements, based on the readme wikitext text/x-wiki VDrift has a high quality simulation engine and graphics so needs a fairly decent computer for it to run the best it can. The following hardware requirements are what can be reasonable expect to have no problems playing the game, but we don't have a comprehensive test suite so feel free to test VDrift on your own computer and tell us the results! ==Processor== VDrift requires a relatively fast CPU. A 2 GHz or better clock speed is recommended, although it should be possible to run VDrift with a 1 GHz or better CPU. ==Graphics== VDrift requires a recent nVidia or ATI graphics card. Intel graphics cards are not recommended. A nVidia GeForce 7-series or ATI Radeon X1000-Series card is recommended in order to enable all the visual effects. By reducing or disabling some of the [[Configuring the display|display options]], it should be possible to play VDrift with a nVidia GeForce 2 or an ATI Radeon 7000. Users should install the newest version of the device drivers for their graphics card to run VDrift. ==Memory== VDrift can consume about 300 MB of memory on a typical run so 512 MB is the minimum requirement but 1 GB or more is recommended, especially for larger tracks ==Storage== The basic [[Downloading|release]] is usually about 650 MB, so you must have at least 700 MB free space before you begin, and more if you wish to add more cars or tracks. While the source code is less than 30 MB, if you [[Getting the development release|get the development release]] you will need at least 2.5 GB as the data repository is about 1.7 GB, you will need to download dependencies as well (up to 60 MB depending on your operating system), and space is needed for build files. You should also check you have enough bandwidth to download these amounts - some ISPs have download limits. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Windows * OS X (10.4 "Tiger" or higher required) * Linux * FreeBSD [[Category:Installation]] 46655d787b0db6cfdde5dc45df5121e67c19cd22 Requirements 0 97 1115 1114 2012-08-26T20:02:11Z Timo 6 3 Small style change wikitext text/x-wiki VDrift has a high quality simulation engine and graphics so needs a fairly decent computer for it to run the best it can. The following hardware requirements are what can be reasonable expect to have no problems playing the game, but we don't have a comprehensive test suite so feel free to test VDrift on your own computer and tell us the results! ==Processor== VDrift requires a relatively fast CPU. A 2 GHz or better clock speed is recommended, although it should be possible to run VDrift with a 1 GHz or better CPU. ==Graphics== VDrift requires a recent nVidia or ATI graphics card. Intel graphics cards are not recommended. A nVidia GeForce 7-series or ATI Radeon X1000-Series card is recommended in order to enable all the visual effects. By reducing or disabling some of the [[Configuring the display|display options]], it should be possible to play VDrift with a nVidia GeForce 2 or an ATI Radeon 7000. You should install newest version of the device drivers for your graphics card. ==Memory== VDrift can consume about 300 MB of memory on a typical run so 512 MB is the minimum requirement but 1 GB or more is recommended, especially for larger tracks. ==Storage== The basic [[Downloading|release]] is usually about 650 MB, so you must have at least 700 MB free space before you begin, and more if you wish to add more cars or tracks. While the source code is less than 30 MB, if you [[Getting the development release|get the development release]] you will need at least 2.5 GB as the data repository is about 1.7 GB, you will need to download dependencies as well (up to 60 MB depending on your operating system), and space is needed for build files. You should also check you have enough bandwidth to download these amounts - some ISPs have download limits. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Windows * OS X (10.4 "Tiger" or higher required) * Linux * FreeBSD [[Category:Installation]] 84cea69b7569be1c37061068b23c221a1ed15ee1 Hardware requirements 0 38 1116 519 2012-08-26T20:03:14Z Timo 6 3 Content moved to Requirements wikitext text/x-wiki #REDIRECT [[Requirements]] e67dda17c103b131d4c61035b82aab4c7cbdf7b1 Software requirements 0 77 1117 912 2012-08-26T20:03:29Z Timo 6 3 Content moved to Requirements wikitext text/x-wiki #REDIRECT [[Requirements]] e67dda17c103b131d4c61035b82aab4c7cbdf7b1 Downloading 0 98 1118 2012-08-26T20:08:06Z Timo 6 3 Basic information for downloading releases - partly moved from Getting VDrift wikitext text/x-wiki Before you download VDrift, make sure your computer meets the [[Requirements|requirements]]. ==Downloads== Links to the latest release are on the [http://vdrift.net homepage]. Downloads are hosted on [http://sourceforge.net/projects/vdrift/ Sourceforge]. You should download the latest release for your operating system. If a package is not available for your operating system, you can try downloading the source release and then [[Compiling|compiling]] VDrift yourself. ==Version Numbering== VDrift is versioned according to the date of the release, in the format ''yyyy-mm-dd'', so the latest release is the one with a version number closest to the current date. [[Category:Installation]] e0b54e33d18569eaca6919ffa9ec9e099041aa4c Installing 0 42 1119 538 2012-08-26T20:15:36Z Timo 6 3 Combine all installing pages, using collapsing sections wikitext text/x-wiki This page describes how to install the latest VDrift package. It assumes you have [[Downloading|downloaded the latest release]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> * Double click the '''vdrift-''yyyy-mm-dd''.exe''' file (probably in your '''Downloads''' folder). * Follow the instructions in the wizard that opens. * Start VDrift from the Start menu (if you have chosen to install the shortcuts). </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> * If your browser hasn't automatically opened it, double click the '''vdrift-mac-''yyyy-mm-dd''.dmg''' file (probably in your '''Downloads''' folder). * Drag or copy the '''VDrift''' application from the resulting mounted disk image named '''VDrift''' to your '''Applications''' folder. * Double-click the '''VDrift''' application now found in your '''Applications''' folder. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> VDrift hasn't been released with a standalone binary package for several releases. If you think you could help us with this, please post in the forums! </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To install the binary package, just use '''pkg_add''': pkg_add -r vdrift {{note|If you choose install vdrift from packages, you must install vdrift-data from FreeBSD ports tree, because this is not available as package.}} cd /usr/ports/games/vdrift-data && make install clean clean-depends </div></div> [[Category:Installation]] 417b04bd69e457e4306edfbe03b587223a40eeb2 VDrift:Todo 4 96 1120 1109 2012-08-26T20:16:31Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] 34e5870180d05aeaa8b45bfdfb01f1074bf909aa 1130 1120 2012-08-26T20:55:41Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] 2277f10d00c475466cc2057e6b6a814cec83a06c 1133 1130 2012-08-26T21:04:25Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] 94c72216b1ab05d57e20a740b4c1039a2cc235b0 1134 1133 2012-08-26T21:07:08Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] 86679437c9899ec014a6ad1bbbca3b9efc715d3c 1142 1134 2012-08-26T21:26:27Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? b7cb29bd37d30c52c2148fa9004a6e4d1945e0db 1149 1142 2012-08-26T22:03:35Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? * Check [[Getting cars|cars]] and [[Getting tracks|tracks]] lists (including descriptions) eff315b0357540f8ed5a066fa06521a2c4d2d6fd Talk:Installing 1 99 1121 2012-08-26T20:17:40Z Timo 6 3 Created page with "[[Installing#Linux|Linux]] and [[Installing#FreeBSD|FreeBSD]] sections need checking. --~~~~" wikitext text/x-wiki [[Installing#Linux|Linux]] and [[Installing#FreeBSD|FreeBSD]] sections need checking. --[[User:Timo 6|Timo 6]] ([[User talk:Timo 6|talk]]) 13:17, 26 August 2012 (PDT) 8c5a7c1d28425433244d2409115b0e3af47fb267 File:VDrift logo.png 6 100 1122 2012-08-26T20:19:43Z Timo 6 3 Full length VDrift logo, for the Main Page wikitext text/x-wiki Full length VDrift logo, for the Main Page 4997d31d36e805ba3f24fe704eb587e798e64c95 Main Page 0 1 1123 1112 2012-08-26T20:21:59Z Timo 6 3 Fix image link wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General Info|General Info]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Contributing]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding Guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modelling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} 9ba7b8afa2fcd342a22cb060b4984232640da76b 1154 1123 2012-08-27T10:03:30Z Timo 6 3 Use US spelling for modeling wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General Info|General Info]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Contributing]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding Guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modeling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} f5fe3bd0f1448aabb8e74aa31eeb46607887e987 Getting the development version 0 36 1124 510 2012-08-26T20:30:13Z Timo 6 3 Information for downloading the development version - partly moved from Getting VDrift wikitext text/x-wiki This page describes how to get the source code of VDrift. It assumes your computer meets the [[Requirements|requirements]]. __TOC__ VDrift's code is kept in a [http://git-scm.com/ Git] repository, hosted by [https://github.com/VDrift/vdrift GitHub]. Some operating system's dependencies are also hosted on GitHub, and the data is hosted on [https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data Sourceforge] in a [http://subversion.apache.org/ Subversion] repository. ==Downloading a snapshot== Both GitHub and Sourceforge allow you to download a snapshot of the current state of the repository. ===Source code=== The source code can be downloaded by going to the [https://github.com/VDrift/vdrift/downloads downloads section] of GitHub and click either "Download as zip" or "Download as tar.gz". Once it has downloaded, uncompress the resulting file into a folder called '''vdrift'''. ===Dependencies=== Dependencies for Windows and OS X can be downloaded in the same way as the source code, from https://github.com/VDrift/vdrift-win/downloads or https://github.com/VDrift/vdrift-mac/downloads respectively. They should be uncompressed into '''vdrift/vdrift-win''' or '''vdrift/vdrift-mac'''. ===Data=== The data can be downloaded from http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/ - just click "Download GNU tarball" near the bottom of the page. Uncompress to '''vdrift/data'''. ==Cloning/Checking out== To easily stay up to date with the latest changes, and to avoid re-downloading large amounts of data, you can use [http://git-scm.com/ Git] and [http://subversion.apache.org/ Subversion] to clone/check out the repositories to your computer. For the following sections it is assumed you have installed [http://git-scm.com/ Git] and [http://subversion.apache.org/ Subversion], and have some knowledge of the command line. If you are using a Git or Subversion client, follow its instructions for downloading repositories. ===Source code=== The following command will clone the source code to a folder called '''vdrift''' in the current directory: git clone git://github.com/VDrift/vdrift.git Then navigate to the '''vdrift''' folder: cd vdrift ===Dependencies=== Cloning the dependencies for Windows and OS X is similar to cloning the source code. Make sure you are still in the '''vdrift''' folder, then execute the command for your operating system: * Windows: git clone git://github.com/VDrift/vdrift-win.git * OS X: git clone git://github.com/VDrift/vdrift-mac.git ===Data=== The data can be checked out into the '''vdrift/data''' folder with the following command. Make sure you are still in the '''vdrift''' folder. svn co https://vdrift.svn.sourceforge.net/svnroot/vdrift/vdrift-data data This will take a while to complete as the data is quite big. [[Category:Development]] 88362791dea59c33bd48f3dcf2052cfda409f000 Getting VDrift 0 33 1125 492 2012-08-26T20:36:46Z Timo 6 3 Redirect to Downloading, some content also moved to Getting the development version wikitext text/x-wiki #REDIRECT [[Downloading]] 8d7e495cad6e57d6d04dd14b04fa495e6a6433be Working with the development version 0 90 1126 1098 2012-08-26T20:39:47Z Timo 6 3 Various improvements, including add information about working with subversion wikitext text/x-wiki This page describes some of the most common commands used when working with VDrift's source code. It assumes you have followed the instructions in the [[Getting the development version#Cloning/Checking out|Cloning/Checking out]] section of [[Getting the development version]]. See this documentation for more up to date and complete information: http://help.github.com/ ==Updating== ===Git=== To update the Git repositories, execute the following command in the root folder of the repository (i.e. '''vdrift''', '''vdrift/vdrift-win''' or '''vdrift/vdrift-mac'''): git pull git://github.com/VDrift/vdrift.git ===Subversion=== To update the data, run the following command while in '''vdrift/data''' svn update ==Making your own changes== ===Git=== These instructions also apply for the dependencies - just change the file paths and URLs. ====Forking==== If you want to make your own changes to improve VDrift, the easiest way is to fork the main VDrift repository on [https://github.com/VDrift/vdrift/ GitHub]. Just click the button near the top right of the page. You will need a free [http://github.com GitHub] account. Then clone your new repo onto your computer: git clone git@github.com:''username''/vdrift.git And link this to the original VDrift repo: cd vdrift git remote add upstream git://github.com/VDrift/vdrift.git git fetch upstream ====Uploading changes==== To upload any changes you've made, first add the files to the commit: git add ''filename'' Then do the commit: git commit -m 'Commit message' And finally send this to GitHub: git push origin master ====Checking in changes==== You can request a VDrift developer to incorporate your changes by initiating a GitHub pull request. See this documentation for more info: http://help.github.com/send-pull-requests/ ===Subversion=== You will need to ask a VDrift developer in the [http://vdrift.net/Forum/index.php forums] for Subversion access in order to commit to the repository. You will need a free [http://sourceforge.net Sourceforge] account. You can then add any new files or folders you've created: svn add ''filename'' And then commit the changes: svn commit -m "Commit message" If you don't want to do this, you can create a diff which you can post in the [http://vdrift.net/Forum/index.php forums]: svn diff ====Thank you for helping make VDrift better for everyone!==== [[Category:Development]] 14442b2f3a45dd104beb93b9d079f94f823a2140 Compiling 0 15 1127 216 2012-08-26T20:51:23Z Timo 6 3 Combine all compiling pages, using collapsing sections wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with Code::Blocks/MinGW=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC=== * Run the appropriate command from the '''vdrift''' folder to generate the build files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 ===Building with Scons(broken)=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH environment variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4]. * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20]. * Run the installer. It should find your Python installation, accept all defaults. * Your PATH environment variable should contain the Python and Python scripts paths (e.g. C:\Python26;C:\Python26\Scripts;). * Run the following command from within the '''vdrift''' folder: tools/win/bin/build_vdrift.bat </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://libarchive.github.com/ libarchive] - library for reading and writing archive formats * [http://bulletphysics.org/wordpress/ libbullet] - Bullet Physics Library: the '''BulletCollision''', '''BulletDynamics''', '''LinearMath''' libraries are required * [http://curl.haxx.se/ libcurl] - the multiprotocol file transfer library * [http://glew.sourceforge.net/ libglew] - OpenGL extension utilities * [http://www.libsdl.org/ libsdl] - Simple Direct Media Layer * [http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx libsdl-gfx] - Graphics drawing primitives library for SDL * [http://www.libsdl.org/projects/SDL_image/ libsdl-image] - Image file loading library for SDL * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec * vorbisfile - File loading library for the ogg vorbis format * [http://www.boost.org/ Boost C++ Libraries] (header-file-only) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ glew-devel libarchive-devel scons SDL_*-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] 5bfd9b2be949e548def096e713901127ffb6fd76 1150 1127 2012-08-26T22:22:20Z Timo 6 3 Update libraries wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with Code::Blocks/MinGW=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC=== * Run the appropriate command from the '''vdrift''' folder to generate the build files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 ===Building with Scons(broken)=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH environment variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4]. * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20]. * Run the installer. It should find your Python installation, accept all defaults. * Your PATH environment variable should contain the Python and Python scripts paths (e.g. C:\Python26;C:\Python26\Scripts;). * Run the following command from within the '''vdrift''' folder: tools/win/bin/build_vdrift.bat </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://www.boost.org/ Boost C++ Libraries] (header-file-only) * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.78). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://glew.sourceforge.net/ GLEW] - OpenGL Extension Wrangler Library (minimum version 1.5.7) * [http://libarchive.github.com/ libarchive] - Multi-format archive and compression library (minimum version 2.8.3) * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * vorbisfile - File loading library for the ogg vorbis format * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 1.2.14) * [http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx SDL_gfx] - Graphics drawing primitives library (minimum version 2.0.16) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 1.2.10) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ glew-devel libarchive-devel scons SDL_*-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] a463185ee33061a5d57539276030f91f5fb35bb5 Compiling VDrift 0 16 1128 324 2012-08-26T20:52:57Z Timo 6 3 Moved to Compiling wikitext text/x-wiki #REDIRECT [[Compiling]] 7c22500cd3e5b4a771796398b1fb96a5b0d00d2a Talk:Compiling 1 101 1129 2012-08-26T20:55:03Z Timo 6 3 Created page with "[[Compiling#Windows|Windows]], [[Compiling#Linux|Linux]] and [[Compiling#FreeBSD|FreeBSD]] sections need checking. --~~~~" wikitext text/x-wiki [[Compiling#Windows|Windows]], [[Compiling#Linux|Linux]] and [[Compiling#FreeBSD|FreeBSD]] sections need checking. --[[User:Timo 6|Timo 6]] ([[User talk:Timo 6|talk]]) 13:55, 26 August 2012 (PDT) 93c49470bf75a328743afde44fce7bcc3969f444 Packaging 0 68 1131 851 2012-08-26T21:02:23Z Timo 6 3 Combine all packaging pages, using collapsing sections wikitext text/x-wiki This page documents how to package VDrift for releasing. It assumes you have [[Compiling|compiled]] VDrift already. ==Common== The '''data/settings/updates.config''' file should be updated to contain the cars that will be included in the release along with their SVN revision numbers. <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Preparation=== * You will need [http://nsis.sourceforge.net/ Nullsoft installer system]. * You should also change the version on line 26 of '''vdrift/vdrift-win/vdrift.nsi''' to the date of the release. ===Packaging=== Right click on the '''vdrift/vdrift-win/vdrift.nsi''' file and select "Compile script". The installer will be created. </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> ===Preparation=== * In Xcode, open the "Info" tab and change "Bundle versions string, short" (CFBundleShortVersionString) and "Bundle version" (CFBundleVersion) to the date of the release. * If you have a code signing identity in Xcode, change the build setting Code Signing Identity to the appropriate profile - usually the automatic Mac Developer. ===Packaging=== In Xcode 4 or higher: * Go to Product -> Edit Scheme, change the build configuration of Run to Release and click OK. * Click Product -> Build. In other Xcode versions: * Switch to the "Release" build style using the popup-menu in the toolbar. * Hit Build -> Build. Run '''vdrift/vdrift-mac/DMG.app''', entering the date of the release and selecting the VDrift.app you just built when asked. The disk image will be created. ===Developer ID=== If you are a member of Apple's Mac Developer Program, you can use your Developer ID to sign the application and improve the experience on OS X Mountain Lion. Follow these instructions, instead of the ones above: * Click Product -> Archive * When the organiser appears, select the newly built archive and click "Distribute". Select "Export Developer ID-signed Application" and follow the instructions. * Run '''vdrift/vdrift-mac/DMG.app''', entering the date of the release and selecting the VDrift.app you just built when asked. The disk image will be created. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Binary packages with autopackage=== ====Prerequisites==== There are some things you need before you can build an autopackage. First and most importantly, the autopackage development tools are needed. As of this writing, only the version in autopackage svn will correctly build the VDrift packages. The next release of the autopackage tools should have all the patches needed to build proper packages. BinReloc is used by VDrift but the code has been imported and you do not need to download this to build a package. You do however need apbuild. Second, you must have two different compilers installed on your machine. This is to do the double-compiling so the vdrift binary will work on Linux no matter what version of glibc was used to build the distribution. Currently, the VDrift package setup uses g++-3.3 and g++-4.1, with gcc-4.1. Another known working setup is g++-3.3, g++-3.4, and gcc-3.4. The compiler versions are set in the '''tools/autopackage/vdrift.apspec''' file in [[Getting the development version|VDrift Git]]. ====Building==== The [http://autopackage.org/ autopackage] project is a very promising and useful next-generation packaging tool for Linux. It aims to help developers create packages that will work on any Linux distribution. VDrift's autopackage creation is integrated into the SCons build system used to build the Linux version of VDrift. To build an autopackage, simply run scons autopackage Two options are important when running this command, '''minimal''' and '''release'''. For instance, scons autopackage minimal=1 will build a package with the minimal data set. This can be combined with the release option to make a release-optimized package with the minimal data set: scons autopackage minimal=1 release=1 Turning these options to 0 turns them off. This affects the package built as one might expect. The package name reflects how it was built. For example: VDrift yyyy-mm-dd-dev-minimal.package VDrift yyyy-mm-dd-full.package Usually the file is renamed to replace the space with a '-' character, so that the URL to the package does not have to contain a "%20". ===Source packages=== Source packages are made in a similar way as autopackages using SCons. scons src-package builds a package named similarly. This package is put into the build/ directory. Currently the build system does tar the source package after compiling it in the build/ directory, but it includes the build directory as a parent in the archive itself. Since this function is not used that much, it has been a low priority to fix, and it is also pretty simple to just run tar manually and create the package. Before doing this however, it is useful to warn the user that there is no data in the source package and they must download one of the source packages in order to install the game. This can be done by replacing the file data/SConscript in the file with the file in the SVN repository data/SConscript.no_data. This is a minor change made to the build system when source packages are made. So, to make all this make sense, here are the commands to build a source package correctly: scons src-package cd build cp ../data/SConscript.no_data data/SConscript tar -jcvf vdrift-yyyy-mm-dd-src.tar.bz2 vdrift-yyyy-mm-dd-src/ Thus you end up with the file '''vdrift-yyyy-mm-dd-src.tar.bz2''' as a finished source package. </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> [[Project:Todo|Todo]] </div></div> [[Category:Development]] 9cca28060c417a7c30cd62ffd16e99e1723f016e Talk:Packaging 1 102 1132 2012-08-26T21:03:58Z Timo 6 3 Created page with "[[Packaging#Windows|Windows]], [[Packaging#Linux|Linux]] and [[Packaging#FreeBSD|FreeBSD]] sections need checking. --~~~~" wikitext text/x-wiki [[Packaging#Windows|Windows]], [[Packaging#Linux|Linux]] and [[Packaging#FreeBSD|FreeBSD]] sections need checking. --[[User:Timo 6|Timo 6]] ([[User talk:Timo 6|talk]]) 14:03, 26 August 2012 (PDT) f00daaaaf172024716391480f99d4939879f69a6 Source code documentation 0 80 1135 934 2012-08-26T21:09:49Z Timo 6 3 Timo 6 moved page [[Source Code Documentation]] to [[Source code documentation]]: Use lower case for consistency wikitext text/x-wiki Doxygen documentation is available for VDrift. Currently only the Subversion trunk is available. It is generated daily from the latest version of the [[Getting the development version|Development version]]. == Other versions == Doxygen output for the last release will be added soon. When new releases are made, documentation will be made available with the release. == Read Online == You can find [http://vdrift.net/doxygen/trunk/ Doxygen for VDrift trunk] at the following URL: http://vdrift.net/doxygen/trunk/ == Download == Downloadable PDF and Zip archives of the HTML version for offline browsing will be available soon. == Help improve documentation == If you are writing new code for VDrift, it would help to write comments using a format Doxygen can take advantage of. Here are a few handy links describing how to do that: * [http://www.stack.nl/~dimitri/doxygen/docblocks.html Doxygen Manual: Documenting Code] * [http://www.stack.nl/~dimitri/doxygen/commands.html Doxygen Manual: Command Reference] * [http://www.stack.nl/~dimitri/doxygen/manual.html Entire Doxygen Manual] [[Category:Development]] [[Category:Documenting]] [[Category:External Resources]] [[Category:Expand]] 5bc6208118f370bfdad9ead1960054672947d23b Source Code Documentation 0 103 1136 2012-08-26T21:09:49Z Timo 6 3 Timo 6 moved page [[Source Code Documentation]] to [[Source code documentation]]: Use lower case for consistency wikitext text/x-wiki #REDIRECT [[Source code documentation]] 3f1b76ac2f75f5692e1e5f90d8526d61f104d148 File:Zeta0.1.png 6 104 1137 2012-08-26T21:13:17Z Timo 6 3 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Zeta1.png 6 105 1138 2012-08-26T21:13:48Z Timo 6 3 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Zeta1closeup.png 6 106 1139 2012-08-26T21:14:15Z Timo 6 3 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 File:Zeta2.png 6 107 1140 2012-08-26T21:14:40Z Timo 6 3 wikitext text/x-wiki da39a3ee5e6b4b0d3255bfef95601890afd80709 Getting the latest release 0 37 1141 512 2012-08-26T21:24:12Z Timo 6 3 Remove double redirect wikitext text/x-wiki #REDIRECT [[Downloading]] 8d7e495cad6e57d6d04dd14b04fa495e6a6433be About the project 0 4 1143 36 2012-08-26T21:57:43Z Timo 6 3 Update cars/tracks numbers wikitext text/x-wiki {{update}} ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v3. It is currently available for Linux, FreeBSD, Mac OS X and Windows. ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 45 tracks based on famous real-world tracks * Over 45 cars based on real-world vehicles * Very realistic, simulation-grade driving physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake and reverse lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback * Race against up to 3 AI with variable difficultly * Engine and road sounds ==Goals== The goals of the VDrift project are: * to be a high-quality, open source racing simulation featuring enjoyable and challenging gameplay; * to take advantage of modern computing hardware to accurately simulate vehicle physics in rich and immersive racing environments; and * to provide a platform for creative experimentation to a community of developers and artists. ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. [[Category:General Info]] [[Category:Update]] cc1bf889ede61fc89dd902619e8b0f59dfa41666 Getting cars 0 108 1144 2012-08-26T22:00:52Z Timo 6 3 Move Getting more cars with some updates wikitext text/x-wiki <small>[[Getting cars|English]] - [[Getting cars/it|Italiano]]</small> A small selection of cars are distributed in the release VDrift packages. This page describes how to get some more. ==List of cars== The following cars are in the [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. To see pictures of some of the cars visit the [http://cars.vdrift.net cars.vdrift.net] website. {| | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/ATT/ ATT]: Audi TT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/DCH/ DCH]: Dodge Challenger (1970) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/DSN/ DSN]: Dacia Supernova * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: F1 car (2002) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F40/ F40]: Ferrari F40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1-91/ KF1-91]: KF1 1991 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1K/ KF1K]: KF1 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1T/ KF1T]: KF1 | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LGN/ LNG]: Dacia Logan * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TRA/ TRA]: Trabant 601 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 |} ==Downloading== Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. ==Installing== Uncompress the .tar.gz file. This should create a folder with the short name of the car containing files like '''about.txt''' and '''body.joe'''. Move that folder to '''vdrift/data/cars''' folder. Run VDrift and your new car will be ready to drive! ==Updating== You can update cars from within VDrift itself. Click "Updates" on the main menu, then "Check for updates". If any are available go to the car in the "Manage Cars" section and click "Apply Update". ==See also== * [[Getting tracks]] [[Category:Cars]] 27ae03d7266b4763e67e62090679e6d8318ac3b2 1155 1144 2012-08-27T10:30:16Z Timo 6 3 /* List of cars */ Use css columns instead of a table (easier to maintain) wikitext text/x-wiki <small>[[Getting cars|English]] - [[Getting cars/it|Italiano]]</small> A small selection of cars are distributed in the release VDrift packages. This page describes how to get some more. ==List of cars== The following cars are in the [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. To see pictures of some of the cars visit the [http://cars.vdrift.net cars.vdrift.net] website. <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/ATT/ ATT]: Audi TT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/DCH/ DCH]: Dodge Challenger (1970) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/DSN/ DSN]: Dacia Supernova * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: F1 car (2002) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F40/ F40]: Ferrari F40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1-91/ KF1-91]: KF1 1991 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1K/ KF1K]: KF1 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1T/ KF1T]: KF1 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LGN/ LNG]: Dacia Logan * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TRA/ TRA]: Trabant 601 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 </div> ==Downloading== Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. ==Installing== Uncompress the .tar.gz file. This should create a folder with the short name of the car containing files like '''about.txt''' and '''body.joe'''. Move that folder to '''vdrift/data/cars''' folder. Run VDrift and your new car will be ready to drive! ==Updating== You can update cars from within VDrift itself. Click "Updates" on the main menu, then "Check for updates". If any are available go to the car in the "Manage Cars" section and click "Apply Update". ==See also== * [[Getting tracks]] [[Category:Cars]] 77a9b37b49193c61c1812ae1ce0de30c8bc946f6 Getting tracks 0 109 1145 2012-08-26T22:01:18Z Timo 6 3 Based on Getting cars wikitext text/x-wiki A small selection of tracks are distributed in the release VDrift packages. This page describes how to get some more. ==List of tracks== The following cars are in the [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. {| | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/a1ring/ A1 Ring] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/bahrain/ Bahrain] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/barcelona/ Barcelona] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/brands/ Brands Hatch] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/charade70/ Charade 1970] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/detroit/ Detroit] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dijon/ Dijon-Prenois] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dirt-3/ Australian Countryside] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/estoril88/ Estoril 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/fuji/ Fuji] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hockenheim/ Hockenheim] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hungaroring06/ Hungaroring 2006] | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/imola2005/ Imola 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/indianhill/ Indian Hill] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/interlagos/ Interlagos] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jarama/ Jarama] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jerez88/ Jerez 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/kyalami/ Kyalami] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/laconca/ La Conca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lagunaseca/ Laguna Seca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lemans/ Le Mans] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/magny/ Magny] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/melbourne/ Melbourne] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco/ Monaco] | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco88/ Monaco 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/montreal/ Montreal] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza/ Monza] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza88/ Monza 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/mosport/ Mosport] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/nuerburgring_nordschleife/ Nürburgring Nordschleife] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Parking Lot] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Pau] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/paulricard88/ Paul Ricard 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ring2007/ Nürburgring Nordschleife 2007] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/road_atlanta/ Road Atlanta] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/rouen/ Rouen] | * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ruudskogen/ Ruudskogen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/sepang/ Sepang] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/singapore/ Singapore] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa/ Spa-Francorchamps] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa2008/ Spa-Francorchamps 2008] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/suzuka2005/ Suzuka 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/vir/ Virgina International] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/wackersdorf/ Wackersdorf] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/weekend/ Weekend Drive] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/zandvoort/ Zandvoort] |} ==Downloading== Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. ==Installing== Uncompress the .tar.gz file. This should create a folder with the name of the track containing files like '''about.txt''' and '''roads.trk'''. Move that folder to '''vdrift/data/tracks''' folder. Run VDrift and your new track will be ready for racing! ==Updating== You can update tracks from within VDrift itself. Click "Updates" on the main menu, then "Check for updates". If any are available go to the track in the "Manage Tracks" section and click "Apply Update". ==See also== * [[Getting cars]] [[Category:Tracks]] 4950d901556bf312404f37cf3a00cc3a4a4ad329 1156 1145 2012-08-27T10:31:26Z Timo 6 3 /* List of tracks */ Use css columns instead of a table (easier to maintain) wikitext text/x-wiki A small selection of tracks are distributed in the release VDrift packages. This page describes how to get some more. ==List of tracks== The following cars are in the [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/a1ring/ A1 Ring] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/bahrain/ Bahrain] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/barcelona/ Barcelona] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/brands/ Brands Hatch] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/charade70/ Charade 1970] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/detroit/ Detroit] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dijon/ Dijon-Prenois] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dirt-3/ Australian Countryside] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/estoril88/ Estoril 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/fuji/ Fuji] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hockenheim/ Hockenheim] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hungaroring06/ Hungaroring 2006] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/imola2005/ Imola 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/indianhill/ Indian Hill] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/interlagos/ Interlagos] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jarama/ Jarama] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jerez88/ Jerez 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/kyalami/ Kyalami] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/laconca/ La Conca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lagunaseca/ Laguna Seca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lemans/ Le Mans] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/magny/ Magny] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/melbourne/ Melbourne] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco/ Monaco] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco88/ Monaco 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/montreal/ Montreal] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza/ Monza] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza88/ Monza 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/mosport/ Mosport] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/nuerburgring_nordschleife/ Nürburgring Nordschleife] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Parking Lot] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Pau] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/paulricard88/ Paul Ricard 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ring2007/ Nürburgring Nordschleife 2007] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/road_atlanta/ Road Atlanta] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/rouen/ Rouen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ruudskogen/ Ruudskogen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/sepang/ Sepang] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/singapore/ Singapore] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa/ Spa-Francorchamps] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa2008/ Spa-Francorchamps 2008] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/suzuka2005/ Suzuka 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/vir/ Virgina International] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/wackersdorf/ Wackersdorf] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/weekend/ Weekend Drive] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/zandvoort/ Zandvoort] </div> ==Downloading== Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. ==Installing== Uncompress the .tar.gz file. This should create a folder with the name of the track containing files like '''about.txt''' and '''roads.trk'''. Move that folder to '''vdrift/data/tracks''' folder. Run VDrift and your new track will be ready for racing! ==Updating== You can update tracks from within VDrift itself. Click "Updates" on the main menu, then "Check for updates". If any are available go to the track in the "Manage Tracks" section and click "Apply Update". ==See also== * [[Getting cars]] [[Category:Tracks]] fe39c9a54a686d0c8481d2d90a09f0ca7739b097 Getting cars/it 0 35 1146 508 2012-08-26T22:01:46Z Timo 6 3 Timo 6 moved page [[Getting more cars/it]] to [[Getting cars/it]]: Consistency wikitext text/x-wiki <small>[[Getting more cars|English]] - [[Getting more cars/it|Italiano]]</small> ==Aggiungere altre autovetture== Questo articolo spiega come si aggiungono altre autovetture per VDrift e come si installano. ==Trovare ulteriori autovetture== * Una gamma di autovetture si possono trovare sul sito [http://cars.vdrift.net cars.vdrift.net]. Apri semplicemente la pagina dell'autovettura che vuoi scaricare e se lo stato visualizza ''playable'' è possibile utilizzarlo per giocare con VDrift. Quindi scarichi il file .zip o .tar.gz * Puoi anche scaricare autovetture da svn. Clicca i link nell'[[List of cars|elenco di autovetture]] (per il momento disponibile solo in inglese) per andare sulla pagina e quindi clicca sul link 'Download GNU Tarball'. ==Installare le autovetture== A questo punto dovresti disporre di un file .zip o .tar.gz. Entrambi sono formati compattati. Per scompattare i files puoi utilizzare software come '''Ark''' o '''File roller''' per Linux e [http://www.7-zip.org/ 7zip] per Windows. Sono tutti software liberi. Durante la scompattazione normalmente si crea una cartella con il nome dell'autovettura. Questa cartella (che dovrebbe contenere files che si chiamano about.txt e body.joe) nella cartella '''... vdrift/data/cars'''. Quindi eseguire VDrift e la nuova autovettura è pronta per essere guidata! [[Category:Cars]] [[Category:Autovetture]] 6894bc188c8ca393647c111898c956cbf9242441 1148 1146 2012-08-26T22:02:26Z Timo 6 3 Fix links wikitext text/x-wiki <small>[[Getting cars|English]] - [[Getting cars/it|Italiano]]</small> ==Aggiungere altre autovetture== Questo articolo spiega come si aggiungono altre autovetture per VDrift e come si installano. ==Trovare ulteriori autovetture== * Una gamma di autovetture si possono trovare sul sito [http://cars.vdrift.net cars.vdrift.net]. Apri semplicemente la pagina dell'autovettura che vuoi scaricare e se lo stato visualizza ''playable'' è possibile utilizzarlo per giocare con VDrift. Quindi scarichi il file .zip o .tar.gz * Puoi anche scaricare autovetture da svn. Clicca i link nell'[[List of cars|elenco di autovetture]] (per il momento disponibile solo in inglese) per andare sulla pagina e quindi clicca sul link 'Download GNU Tarball'. ==Installare le autovetture== A questo punto dovresti disporre di un file .zip o .tar.gz. Entrambi sono formati compattati. Per scompattare i files puoi utilizzare software come '''Ark''' o '''File roller''' per Linux e [http://www.7-zip.org/ 7zip] per Windows. Sono tutti software liberi. Durante la scompattazione normalmente si crea una cartella con il nome dell'autovettura. Questa cartella (che dovrebbe contenere files che si chiamano about.txt e body.joe) nella cartella '''... vdrift/data/cars'''. Quindi eseguire VDrift e la nuova autovettura è pronta per essere guidata! [[Category:Cars]] [[Category:Autovetture]] 7dba1a5b8c38b4743aded879c075398b3db8098f Getting more cars/it 0 110 1147 2012-08-26T22:01:46Z Timo 6 3 Timo 6 moved page [[Getting more cars/it]] to [[Getting cars/it]]: Consistency wikitext text/x-wiki #REDIRECT [[Getting cars/it]] 2405f62ff210a8bbb1af1c54d9056952fc2dd4fe Getting more cars 0 34 1151 501 2012-08-26T22:22:52Z Timo 6 3 Moved to Getting cars wikitext text/x-wiki #REDIRECT [[Getting cars]] 0137267abdf76dc9290941b4cf84858aa80159e9 3D modeling 0 3 1152 23 2012-08-27T10:02:59Z Timo 6 3 Timo 6 moved page [[3D modeling for game data]] to [[3D modeling]]: Shorter title wikitext text/x-wiki ==Blender== [http://blender.org/ Blender] is the best 3D modeling application to use for creating cars, tracks, and related 3D game art for VDrift. ===General Use=== * [http://wiki.blender.org/ Blender Wiki] - All the official Blender documentation, including the [http://wiki.blender.org/index.php/Doc:Manual User's Manual]. * [http://blenderunderground.com/video-tutorials/ BlenderUnderground Blender Video Tutorials] - The Blender Basics series seeks to provide a way for those new to Blender, or those new to 3D graphics in general, to begin to master this powerful and capable application. * [http://www.blenderart.org/issues/ BlenderArt Magazine] - A magazine dedicated to Blender. ===Modeling Cars=== * [http://www.blendernation.com/2006/04/15/tutorial-modeling-a-toyota-celica/ BlenderNation Tutorial: Modeling a Toyota Celica] - If you want to learn how to model a car from reference pictures, then check out this tutorial. It covers techniques such as loading bitmaps in the 3D viewports, tracing them, mesh extrusion, normal correction and using subdivision surfaces. Aimed at intermediate level Blender users. * [http://issuu.com/blenderart_magazine/docs/blenderart_mag-8_eng BlenderArt Magazine, Issue 8: Car Modeling] - An entire magazine issue about modeling cars. ===Modeling Tracks=== * [http://supertuxkart.sourceforge.net/Blender_track_modelling_tutorial Super TuxKart Track Modeling Tutorial] - A little guide on how to build tracks with Blender and how to avoid common pitfalls. Some basic Blender knowledge is assumed. [[Category:Cars]] [[Category:Tracks]] [[Category:External Resources]] [[Category:Expand]] 21b1e0c30f2375de2dd5acc208cbdde69769520d 3D modeling for game data 0 111 1153 2012-08-27T10:03:00Z Timo 6 3 Timo 6 moved page [[3D modeling for game data]] to [[3D modeling]]: Shorter title wikitext text/x-wiki #REDIRECT [[3D modeling]] 1965cfe895042bc1d467157c044744eaf37b0427 Category:Installation 14 113 1158 2012-08-27T10:59:47Z Timo 6 3 Installation information wikitext text/x-wiki These pages contain instructions on how to install VDrift on a computer. f63e89a832284f43ff1d06d72388aa329e1f7b88 Category:Configuration 14 114 1159 2012-08-27T11:00:17Z Timo 6 3 Configuration information wikitext text/x-wiki These pages describe how to configure VDrift. cef10b2fae42017d4f0f5c21da7e5f6c1aba3baa Category:Playing 14 115 1160 2012-08-27T11:01:17Z Timo 6 3 Playing information wikitext text/x-wiki These pages contain instructions on how to play VDrift. fe38f6491bbcba6862551c7fcc77c232877d2255 Category:Files 14 116 1161 2012-08-27T11:01:59Z Timo 6 3 Files information wikitext text/x-wiki These pages contain information regarding the VDrift's various configuration and data files, their locations, and their formats. 70a4cfe30f3001649be6a19df22d5ccc4d2c0327 Category:Development 14 117 1162 2012-08-27T11:02:30Z Timo 6 3 Development information wikitext text/x-wiki These pages contain information useful to developers who wish to modify the VDrift source code in some way. ba37ea38f93b419fbf282a9959d1f7410c783f46 Category:Cars 14 118 1163 2012-08-27T11:04:15Z Timo 6 3 Cars information wikitext text/x-wiki These pages contain information about VDrift cars. 4ca777fa647701f6c0fe598a5261650d5ea5bf49 Category:Tracks 14 119 1164 2012-08-27T11:04:40Z Timo 6 3 Tracks information wikitext text/x-wiki These pages contain information about VDrift tracks. 24bd836568bfcc9cc8a6337e1e957bae9f614ac6 Old List of cars 0 57 1165 721 2012-08-27T11:06:22Z Timo 6 3 Moved to part of Getting cars wikitext text/x-wiki #REDIRECT [[Getting cars]] 0137267abdf76dc9290941b4cf84858aa80159e9 Old List of Tracks 0 56 1166 705 2012-08-27T11:07:24Z Timo 6 3 Moved to part of Getting tracks wikitext text/x-wiki #REDIRECT [[Getting tracks]] b6a76c7062a0357e5068c6daf5c4c08ef2432835 Compiling on Mac OS X 0 17 1167 326 2012-08-27T11:09:26Z Timo 6 3 Redirect to current compiling page wikitext text/x-wiki #REDIRECT [[Compiling]] 7c22500cd3e5b4a771796398b1fb96a5b0d00d2a Compiling on Windows 0 18 1168 328 2012-08-27T11:12:41Z Timo 6 3 Redirect to current compiling page wikitext text/x-wiki #REDIRECT [[Compiling]] 7c22500cd3e5b4a771796398b1fb96a5b0d00d2a VDrift:Todo 4 96 1169 1149 2012-08-27T11:13:31Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? * Check [[Getting cars|cars]] and [[Getting tracks|tracks]] lists (including descriptions) * Missing [[File:Track-smoothing.png]] in [[Creating tracks]] 28dd29dd1c0e48f4509b270387d19a3de838893a 1171 1169 2012-08-27T12:59:11Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? (i.e. http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Car_parameters) * Check [[Getting cars|cars]] and [[Getting tracks|tracks]] lists (including descriptions) * Missing [[File:Track-smoothing.png]] in [[Creating tracks]] d1ef7c079fde55f2d9cb7e8be0ba9f0204b5b155 1186 1171 2012-08-27T13:34:13Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? (i.e. http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Car_parameters) * Check [[Getting cars|cars]] and [[Getting tracks|tracks]] lists (including descriptions) * Missing [[File:Track-smoothing.png]] in [[Creating tracks]] * Do something with [[Executing VDrift]] a40f43ca6ff5b009b3e2dee9f757895a3d9b744e 1204 1186 2012-08-27T15:21:27Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? (i.e. http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Car_parameters) * Check [[Getting cars|cars]] and [[Getting tracks|tracks]] lists (including descriptions) * Missing [[File:Track-smoothing.png]] in [[Creating tracks]] * Missing [[File:M250a1k'''***'''dt01t20.pdf.png]] (multiple files) in [[Old Numerical Intergation]] * Do something with [[Executing VDrift]] dbe9cb6416253fa60113d78685be941563761432 1205 1204 2012-08-27T15:22:03Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? (i.e. http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Car_parameters) * Check [[Getting cars|cars]] and [[Getting tracks|tracks]] lists (including descriptions) * Missing [[File:Track-smoothing.png]] in [[Creating tracks]] * Missing files in [[Old Numerical Integration]] * Do something with [[Executing VDrift]] 55e8f03884a8eb3d38ef5287efb7092029a6c9dc 1207 1205 2012-08-27T15:33:53Z Timo 6 3 wikitext text/x-wiki * Fix links on [[Authors and contributors]] * Check Linux and FreeBSD sections in [[Installing]] * Check Windows, Linux and FreeBSD sections in [[Compiling]] * Check Windows, Linux and FreeBSD sections in [[Packaging]] * Check [[Testing]] * Check [[Debugging]] * Combine Car parameter pages? (i.e. http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Car_parameters) * Check [[Getting cars|cars]] and [[Getting tracks|tracks]] lists (including descriptions) * Missing [[File:Track-smoothing.png]] in [[Creating tracks]] * Missing files in [[Old Numerical Integration]] Interestingly, [http://wayback.archive.org/web/*/http://wiki.vdrift.net Wayback Machine] has the files in [[Numerical Integration]], but not the ones above, so they may have been missing for a long time. * Do something with [[Executing VDrift]] b77ba398acac5fa2927689cf7e8ce945ec13daa3 Autoupdate 0 7 1170 70 2012-08-27T11:22:54Z Timo 6 3 Formatting style updates wikitext text/x-wiki This page describes, at a high level, how the auto-update function works. ==Introduction== One major barrier to releasing more often is the huge size of the VDrift releases. These large sizes are due to the large number of cars and tracks that are typically included in a release. If VDrift has auto-update functionality, then releases can be very minimal (one track and one car, for example) and people can download new cars and tracks (and keep their existing ones up to date) through an in-game interface. The rest of this document talks exclusively about updating cars, but tracks should work similarly. The auto-update functionality was first proposed in this forum post: http://vdrift.net/Forum/viewtopic.php?p=12999 ==User Interface== Several GUI pages have been added. From the main menu, the "Cars and Tracks" button takes the user to a page with options to check for updates and manage cars. When the user clicks "Check for Updates", the sourceforge svn browser html is scraped to get the latest revision numbers for the car folders. The car manager UI is populated from code and allows the user to see what updates are available and provides an "Apply Update" button. ==Versioning== There are two types of versioning: the versioning for each car folder, and the versioning for the car format. First, car folder versioning. The '''data/settings/updates.config''' file is distributed with each release, and contains the cars that have been included in that release along with their SVN revision numbers. When the game checks for updates, the sourceforge svn browser html is scraped to get the latest revision numbers, and that information ([available_cars] section) along with the current on-disk versions ([cars] section) are stored in an '''updates.config''' in the user's folder ('''~/.vdrift''' on Linux). The game offers to apply updates when the on-disk versions are less than the available versions. Next, car format versioning. Sometimes, the format of car files changes in a way that breaks compatibility with old data files. To protect against updating cars to a format that the user's executables won't understand, format versions are stored in the '''updates.config''' file in the [formats] section. The version of the car format that the executable release understands is set in the '''data/settings/updates.config''' file included in the release (and copied to the user's folder). The game retrieves the latest '''data/settings/update.config''' via the sourceforge svn website and checks the format version there to make sure it matches the version number in the local '''update.config'''. If the format versions are not equal, updates will refuse to apply. ==Updating== When the user clicks "Apply Update", the car format versioning is re-checked per the description above. If the car format versions mismatch, the game refuses to continue. Otherwise, updates are applied by fetching the .tar.gz bundle for a car's folder from sourceforge's http svn browser to a temporary folder ('''~/.vdrift/tmp''' on linux). This file then decompressed using libarchive into the settings directory ('''~/.vdrift''' on Linux) under a '''cars''' subdirectory. The game should look here first when loading car files, and fall back to the global data path. The downloaded file is deleted once the update completes successfully, otherwise it leaves the temporary file around for troubleshooting. [[Category:Development]] 6e068109d1fdc217cb6da95091ca1c2533c194c3 Talk:Car parameters 1 120 1172 2012-08-27T13:00:46Z Timo 6 3 Created page with "Could all the Car parameter pages (this one, [[Car parameters for vdrift-2010-06-30]] and [[Car parameters for vdrift-2009-06-15 and older]]) be combined into one, using colla..." wikitext text/x-wiki Could all the Car parameter pages (this one, [[Car parameters for vdrift-2010-06-30]] and [[Car parameters for vdrift-2009-06-15 and older]]) be combined into one, using collapsible sections (see http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Car_parameters)? --[[User:Timo 6|Timo 6]] ([[User talk:Timo 6|talk]]) 06:00, 27 August 2012 (PDT) e397013f06297b4d0de974737b39ea1ffd980e20 Coding guidelines 0 13 1173 205 2012-08-27T13:06:21Z Timo 6 3 Update link wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not overuse comments. Only comment code which has side effects, is not clear at first glance, or includes complex operations. It is OK to comment a section of code with a description of what that section does. It is a good idea to comment most non-trivial classes, methods, and instance variables. When commenting code, keep in mind that using [http://doxygen.org/ Doxygen] style comments will help to generate better documenation. See [[Source code documentation]] for more information. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, the CAR should contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if there is a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should ''not'' know anything about the SETTINGS module and should not access it. The advantage is that now the RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If the SETTINGS subsystem is later rewritten, it doesn't (and shouldn't ever) cause any changes to code in the RENDERER. The RENDERER is now decoupled from the SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. ==Testing== Unit testing is encouraged. VDrift comes with the [http://quicktest.sourceforge.net QuickTest] unit testing framework. To use, simply #include "unittest.h" in your source code implementation files. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} [[Category:Development]] [[Category:Documenting]] [[Category:Expand]] 8463ccc0b9f0d899528e6604eb907dd4ab216c35 1174 1173 2012-08-27T13:07:14Z Timo 6 3 Timo 6 moved page [[Coding Guidelines]] to [[Coding guidelines]]: Use lower case for consistency wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not overuse comments. Only comment code which has side effects, is not clear at first glance, or includes complex operations. It is OK to comment a section of code with a description of what that section does. It is a good idea to comment most non-trivial classes, methods, and instance variables. When commenting code, keep in mind that using [http://doxygen.org/ Doxygen] style comments will help to generate better documenation. See [[Source code documentation]] for more information. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, the CAR should contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if there is a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should ''not'' know anything about the SETTINGS module and should not access it. The advantage is that now the RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If the SETTINGS subsystem is later rewritten, it doesn't (and shouldn't ever) cause any changes to code in the RENDERER. The RENDERER is now decoupled from the SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. ==Testing== Unit testing is encouraged. VDrift comes with the [http://quicktest.sourceforge.net QuickTest] unit testing framework. To use, simply #include "unittest.h" in your source code implementation files. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} [[Category:Development]] [[Category:Documenting]] [[Category:Expand]] 8463ccc0b9f0d899528e6604eb907dd4ab216c35 Coding Guidelines 0 121 1175 2012-08-27T13:07:14Z Timo 6 3 Timo 6 moved page [[Coding Guidelines]] to [[Coding guidelines]]: Use lower case for consistency wikitext text/x-wiki #REDIRECT [[Coding guidelines]] fda9eccae51a70e0967b49cc89b2e514e98f1d56 Main Page 0 1 1176 1154 2012-08-27T13:07:50Z Timo 6 3 Fix link wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General Info|General Info]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Contributing]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting Techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modeling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} b9bd03288396d0a13779ef0e390f1295e5864891 1182 1176 2012-08-27T13:20:36Z Timo 6 3 Update link wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General Info|General Info]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Contributing]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modeling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} 8ed8b150498e4af55f4d6ed1325a301e37ae4fcb Configfile format 0 19 1177 339 2012-08-27T13:09:02Z Timo 6 3 Formatting style updates wikitext text/x-wiki Many of VDrift's text-based data and configuration files are written in a format native to the game. The format is designed to be simple and easy to read, while flexibly storing many different kinds of data. It allows settings to be categorized into sections. This format is defined by the ''CONFIG'' class in '''include/config.h''' and '''src/config.cpp'''. ==Features== ===Encoding=== Files in this format are interpreted as plain ASCII text. UTF-8 is not yet supported. ===Include directives=== Lines that start with '''include''' will load sections and settings from another file written in the format. The file may be named using a relative path, which follows the '''include''' keyword and a single space. If the same section exists in both files, a union of the two sections will result in the file which had the include directive. Values from the including file override those in the included file. Circular includes are repressed. ===Comments and Whitespace=== Comments begin with '''#''' and can occur at any point in a line. Everything following the '''#''' is ignored until the end of the line. Whitespace before and after an identifier, name, or value is ignored; however, all spaces are preserved inside both section and setting identifiers. Line breaks are significant -- each line may contain only one section heading, '''include''' directive, or setting. ===Sections=== Sections (categories) are defined by a heading line with an identifier only. The section identifier may be placed between optional '''[''' and ''']''' brackets. Identifiers are case-sensitive. Sections are categorical (flat), not hierarchical (nested). It is possible to create a category hierarchy by carefully naming each section, but the format does not provide any mechanism for managing or traversing a hierarchy. Settings included in a section are all those on lines following the section heading, until the next section heading or the end of the file. ===Settings=== Settings (data items) are defined by a line with the form '''''name'' = ''value''''', where ''name'' is the identifier for the setting and ''value'' is the data for the setting. No restrictions are placed on the type, length, or formatting of the value stored in a setting. Setting identifiers are case-sensitive. Settings before the first section heading have no section. They are referenced by their identifiers preceded by a '''.''' character. ====Value types==== The format employs a somewhat loose typing scheme. Settings do not need to have their types explicitly defined. In the game code, an item can be queried as any type, and depending on the value of the item, certain values can be interpreted differently when requested as different types. Values can be requested as any of the following: * booleans * integer numbers * floating point numbers * strings * lists For instance, the item '''2nd.now''' from the example above would have the value ''1'' if interpreted as an integer. If interpreted as a boolean, its value would be ''true''; as a string, its value would be ''"1"''; as a floating-point number, its value would be ''1.0''. ====Booleans==== The following values will equal ''true'' and ''false'', respectively, when interpreted as boolean values: * '''true''', '''false''' * '''yes''', '''no''' * '''on''', '''off''' * '''1''', '''0''' ====Lists==== List settings may be defined by writing a list of values separated by commas instead of just a single value. ==Example== A file in this format might look like this. name = Example [ first ] stuff = 567 blah = hello radius = 0.555 [ 2nd ] beans = on now = 1 position = 5,6,7 In the file, there are two categories, each with three data items. These items would be referenced by the following identifier strings, respectively: * '''.name''' * '''first.stuff''' * '''first.blah''' * '''first.radius''' * '''2nd.beans''' * '''2nd.now''' * '''2nd.position''' [[Category:Files]] [[Category:Expand]] ae26250f19f905909b8e7cba491db8aa65673d9a Configuring the controls 0 20 1178 348 2012-08-27T13:13:22Z Timo 6 3 Formatting style updates wikitext text/x-wiki {{update}} VDrift aims to be very user input friendly, and thus there are many different ways to adjust the controls in the game to fit each user's needs. There are options which affect all the controls, options which affect only a certain type of controls, and options that affect each individual control assignment. ==Features== * Any input method can be used to navigate the menu. * Joysticks can be used by calibrating them in the Options -> Controls -> Joystick -> Calibrate menu. * Any input can be assigned to any control. * Gas, brake, and steering controls only allow a single setting. All other controls can have any number of settings on any types of input devices. ==Control options== Control options are defined in the text configuration file [[options.config]], set in the Options -> Controls menu and its submenus, and stored in the text configuration file [[VDrift.config]]. ===AutoClutch=== * type: boolean * setting: control.autoclutch * values: on, off Enable/disable automatic clutching (prevents car from stalling). Simulates the driver pressing the clutch in using foot when RPM gets close to the stall point. ===AutoShift=== * type: boolean * setting: control.autotrans * values: on, off Enable/disable automatic transmission shifting. ===Button Control Delay=== * type: float * setting: control.button_ramp * values: off (0.0), long (5.0), medium (7.5), short (10.0) Slow down application of button inputs on analog controls. ===Speed Affect on Steering=== * type: float * setting: control.speed_sens_steering * values: range 0.0 to 1.0 The higher the value on this setting, the more steering is limited as car speed increases. ===Joystick Type=== * type: string * setting: joystick.type * values: "joystick", "wheel" Change the type of joystick device. ===Force Feedback Device=== * type: string * setting: joystick.ff_device * values: something like "/dev/input/eventX" Device file for force feedback events. For more detail, see [[Setting up force feedback]]. ===Force Feedback Gain=== * type: float * setting: joystick.ff_gain * values: range 0.5 to 5.0 Multiplier to adjust strength of force feedback. ===Invert Force=== * type: boolean * setting: joystick.ff_invert * values: on, off Reverse the force feedback, if necessary for your wheel. ===200 Degree Wheel=== * type: boolean * setting: joystick.two_hundred * values: on, off Limit steering range to 200 degrees, gives a realistic feel to limited range wheels. ==Assigning controls== Control assignments can be configured through the submenus of the Options -> Controls -> Assign Controls menu, and stored in the text configuration file [[controls]]. Control assignments can be edited after they are set. There are two basic types of control, analog and digital. Analog controls include joystick axes and mouse motion, while digital controls are keys, mouse buttons and joystick buttons. Any type of input can be assigned to any type of control. So, for example, a digital control - like a key - can be assigned to an analog control. If the "Button Control Delay" option is something other than 0.0, then the key will behave just like a true analog control. ===Car Controls=== =====Gas===== * control name: gas The gas control causes the car to speed up. =====Brake===== * control name: brake The brake control causes the car to slow down. =====Steer Left===== * control name: steer_left The steer left control causes the car to turn left. =====Steer Right===== * control name: steer_right The steer right control causes the car to turn right. =====Start Engine===== * control name: start_engine The start engine control will restart the engine if it stalls. {{note|The engine will not start unless the car's transmission is in neutral.}} =====Handbrake===== * control name: handbrake The handbrake brakes only on the back wheels. =====ABS Toggle===== * control name: abs_toggle The ABS Toggle turns anti-lock braking on or off while playing. =====TCS Toggle===== * control name: tcs_toggle The TCS Toggle turns traction control on or off while playing. ====Transmission==== =====Shift Up===== * control name: disengage_shift_up The shift up control changes the car's gear to the next one. =====Shift Down===== * control name: disengage_shift_down The shift down control changes the car's gear to the previous one. =====Engage Clutch===== * control name: engage The engage clutch control lets out the clutch. This must be done after every shift. =====Analog Clutch===== * control name: clutch The analog clutch control can allow you to use an external clutch pedal. ====Gears==== =====Neutral===== * control name: neutral The neutral control shifts the car into neutral. =====1st===== * control name: first_gear The first gear control shifts the car into first gear. =====2nd===== * control name: second_gear The second gear control shifts the car into second gear. =====3rd===== * control name: third_gear The third gear control shifts the car into third gear. =====4th===== * control name: fourth_gear The fourth gear control shifts the car into fourth gear. =====5th===== * control name: fifth_gear The fifth gear control shifts the car into fifth gear. =====6th===== * control name: sixth_gear The sixth gear control shifts the car into sixth gear. =====Reverse===== * control name: reverse The reverse control puts the car into reverse gear. ===Game Controls=== =====Pause===== * control name: pause The pause control freezes the game (except in multiplayer). ====Camera Views==== =====Previous Camera===== * control name: view_prev_camera This moves to the previous camera in the set (hood, in-car, chase rigid, chase loose). =====Next Camera===== * control name: view_next_camera This moves to the next camera in the set (hood, in-car, chase rigid, chase loose). =====Hood===== * control name: view_hood The hood camera control moves the camera to the car's hood. =====In-Car===== * control name: view_incar The in-car camera control moves the camera to driver's view. =====Chase (Rigid)===== * control name: view_chaserigid The rigid chase camera control moves the camera to a fixed distance behind the car. =====Chase (Loose)===== * control name: view_chase The loose chase camera control moves the camera to follow the car like a helicopter. =====Orbit===== * control name: view_orbit The orbit camera control swings around the car [[Configuring the controls#Camera_Movement|as the camera moves]]. =====Free===== * control name: view_free The free camera control can be moved anywhere using the arrow keys. =====Focus Next===== * control name: focus_next_car Changes the camera to focus on the next car. =====Focus Previous===== * control name: focus_prev_car Changes the camera to focus on the previous car. ====Camera Movement==== =====Pan Left===== * control name: pan_left Turn the camera view to the left. =====Pan Right===== * control name: pan_right Turn the camera view to the right. =====Pan Up===== * control name: pan_up Turn the camera view upwards. =====Pan Down===== * control name: pan_down Turn the camera view downwards. =====Zoom In===== * control name: zoom_in Zoom camera in. =====Zoom Out===== * control name: zoom_out Zoom camera out. ====Replays==== =====Skip Forward===== * control name: replay_ff The skip forward control skips ahead ten seconds during a replay. =====Skip Backward===== * control name: replay_rw The skip backward control goes back ten seconds during a replay. ====Tools==== =====Screen Shot===== * control name: screen_shot The screen shot control saves a snapshot of the game while playing. =====Joystick Info===== * control name: joystick_info The joystick info control shows debugging info for available joysticks. ==Editing Controls== After controls have been assigned they can be edited to change some properties of the control. To edit a control just click on it in one of the control assignment menus. ===Analog control properties=== Analog controls include joystick axes and mouse motion. These have options for deadzone, gain and exponent. ====Deadzone==== Deadzone allows motion under a certain threshold percentage to be ignored. This is useful if you use a joystick which "wobbles" around the center. You may see the brake lights come on when you let go of the gas, or the car is hard to keep going straight, deadzone will help to fix these things. ====Gain==== Gain multiplies the input value by a percentage. This will make the input value increase linearly. ====Exponent==== Exponent raises the input value on an exponential curve. This helps give more fine-tuning of controls such as steering around the center but still allows for making sharp turns if needed. ===Digital control properties=== ====Up/Down==== This controls whether the action will be triggered when the button/key is pressed (down), or released (up). ====Held/Once==== This should be set to "held" when they a digital input is mapped to an analog control, like when using keys for gas, brake or steering. This is set automatically when the control is assigned. ==Deleting controls== There is a Delete button on each Control Editing screen, so to delete a control just click on it, then click Delete. [[Category:Configuration]] [[Category:Update]] 49134e14613861f9fc0dfb4562424eda66e05369 Configuring the display 0 21 1179 357 2012-08-27T13:17:26Z Timo 6 3 Formatting style updates wikitext text/x-wiki {{update}} Configuring the display is done by editing [[VDrift.config]] manually, or by changing the settings in the Options -> Display and Options -> Display -> Advanced menus. ==Display Options== ===Resolution=== * type: integer pair * settings: display.width, display.height * values: depends on the file '''vdrift/data/lists/videomodes''' and the resolutions your video card makes available Change the resolution of the game display. See [[Adding video modes]] for how to make new video modes available to choose from. ===Fullscreen=== * type: boolean * setting: display.fullscreen * values: on, off Make the game take up the entire screen. ===Speed Units=== * type: boolean * setting: display.mph * values: on = "MPH", off = "km/h" Change the units that speed is displayed in. ===Framerate Counter=== * type: boolean * setting: display.show_fps * values: on, off Enable/disable the framerate counter. ===Heads Up Display=== * type: boolean * setting: display.show_hud * values: on, off Enable/disable the heads up display. ===Menu Skin=== * type: string * setting: display.skin * values: default "simple", the name of any directory in '''vdrift/data/skins/''' Change the graphics and layout of the VDrift menus. ===Input Graph=== * type: boolean * setting: display.input_graph * values: on, off Visualize the steering and acceleration/braking on screen. ==Advanced Display Options== ===Color Depth=== * type: integer * setting: display.depth * values: 16, 32 Adjust the amount of colors available. ===Texture Size=== * type: string * setting: display.texture_size * values: "small", "medium", "large" Change the size of the textures displayed. ===View Distance=== * type: floating-point * setting: display.view_distance * values: any positive decimal number of meters Change the maximum view distance. ===Anisotropic Filtering=== * type: integer * setting: display.anisotropic * values: depends on your video card Set anisotropic filtering level for textures. ===Antialiasing=== * type: integer * setting: display.antialiasing * values: depends on your video card Set the full scene antialiasing level. ===Car Shadows=== * type: boolean * setting: display.car_shadows * values: on, off Draw simple static shadows beneath the cars. ===Field of View=== * type: floating-point * setting: display.FOV * values: any positive decimal number Field of view angle in the vertical direction. ===Lighting Quality=== * type: integer * setting: display.lighting * values: 0, 1 Set how good the lighting looks during gameplay. 0 is Low, which is totally static lighting. 1 is Medium, static cube-mapped lighting. ===Reflection Quality=== * type: integer * setting: display.reflections * values: 0, 1, 2 Set how good the reflections look during gameplay. 0 is Low, static sphere-mapped reflections. 1 is Medium, static cube-mapped reflections, and 2 is High, dynamic cube-mapped reflections. [[Category:Configuration]] [[Category:Update]] 30b2539ad22625f60a0ab4423856b9bae25bd04a Drifting techniques 0 30 1180 462 2012-08-27T13:20:17Z Timo 6 3 Timo 6 moved page [[Drifting Techniques]] to [[Drifting techniques]]: Use lower case for consistency wikitext text/x-wiki Drifting can be a very tedious and difficult feat to achieve. Some consider it an art, while others consider it recklessness. This is just a game, so pick up your paintbrush! ==About drifting== "Drifting refers to a driving technique and to a motorsport where the driver intentionally over steers, causing loss of traction in the rear wheels through turns, while maintaining vehicle control and a high exit speed. A car is drifting when the rear slip angle is greater than the front slip angle prior to the corner apex, and the front wheels are pointing in the opposite direction to the turn (e.g. car is turning left, wheels are pointed right or vice versa), and the driver is controlling these factors." (from [http://en.wikipedia.org/wiki/Drifting_%28motorsport%29 Wikipedia]) Drifting is caused by a lack of traction to the rear tires. The spinning of the tires causes the vehicle's rear end to "swing" out causing oversteer. Different cars will behave differently due to differences in torque, tire tread, weight placement, and suspension recoil. The spinning of the tires also "pushes" the back end of the car forward, so once in oversteer, it will need to be controlled. ==Initiating a drift== There are a number of ways to get yourself into a drift. As said before, weight placement and suspension recoil can affect your traction on the rear tires. Here are some techniques: ===Handbrake=== Probably the easiest thing to do, but, however, most cars in the game do not have strong enough braking to do this. Just activate the handbrake and it will cause your car to lose traction. ===Steer + gas=== Ride your gas at a moderate RPM and steer into the corner. Once your front end starts turning, give it some more gas and you will get into an oversteer. ===Suspension recoil=== Use your suspension to "jump" the car into a drift. Steer away from the corner quickly and steer back in. This will cause a bouncing effect from left to right (or vice versa). Apply the "steer + gas" technique to get into oversteer if not achieved already. ===The dip=== "Dip" your back tires in the dirt or grass or whatever off the track. This will cause your back end to swing a bit. ==Controlling the drift== This is simple to do, but hard to perfect. Essentially, you will only need to steer to get your wheels pointed the direction you want to go. You will also need to control your throttle. The slower your tires spin, the more traction you will have. The opposite happens with faster spinning tires. Control your throttle and be careful not to give it too much juice or you will most likely spin out. Spinning out usually happens when the car is oversteered too much. The tires keep spinning and your car continues to rotate into the turn, but the front end will have too much traction and cause the car to rotate more. ==Cars== {{update}} Some cars are easier than others to drift in the game. Excessive oversteer can be a problem for beginners. Lots of torque and traction make initiation and recovery easy. *Z06 *GT *G4 [[Category:Playing]] [[Category:Review]] b60cda262b461a9820f159a434a9b44b924a468a Drifting Techniques 0 122 1181 2012-08-27T13:20:17Z Timo 6 3 Timo 6 moved page [[Drifting Techniques]] to [[Drifting techniques]]: Use lower case for consistency wikitext text/x-wiki #REDIRECT [[Drifting techniques]] e1ec8e8e370a249aa2153c2ad8def60db89f75b6 Enabling force feedback in kernel 0 31 1183 480 2012-08-27T13:22:09Z Timo 6 3 Formatting style updates wikitext text/x-wiki Here is how to enable force feedback on Ubuntu 8.10 64 bits kernels (should also work on 32 bits ones): ==For the G25 owners== If you use a G25 wheel, you need to patch your kernel to be able to use it in its native mode First create a patch file named G25.patch for the kernel ( patches for 2.6.27 and 2.6.28 are provided ). ===kernel 2.6.27=== diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c 2009-02-23 22:21:27.000000000 +0100 @@ -57,6 +57,7 @@ { 0x46d, 0xc286, hid_lgff_init }, /* Logitech Force 3D Pro Joystick */ { 0x46d, 0xc294, hid_lgff_init }, /* Logitech Formula Force EX */ { 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */ + { 0x46d, 0xc299, hid_lgff_init }, /* Logitech G25 wheel */ { 0x46d, 0xca03, hid_lgff_init }, /* Logitech MOMO force wheel */ #endif #ifdef CONFIG_LOGIRUMBLEPAD2_FF diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c 2009-02-23 22:23:22.000000000 +0100 @@ -55,6 +55,7 @@ { 0x046d, 0xc286, ff_joystick }, { 0x046d, 0xc294, ff_joystick }, { 0x046d, 0xc295, ff_joystick }, + { 0x046d, 0xc299, ff_joystick }, { 0x046d, 0xca03, ff_joystick }, }; diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c 2009-03-13 18:54:14.000000000 +0100 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c 2009-02-23 22:25:45.000000000 +0100 @@ -316,6 +316,7 @@ #define USB_DEVICE_ID_LOGITECH_HARMONY_64 0xc14f #define USB_DEVICE_ID_LOGITECH_EXTREME_3D 0xc215 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 +#define USB_DEVICE_ID_LOGITECH_WHEELG25 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c @@ -625,6 +626,7 @@ { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEELG25, HID_QUIRK_NOGET }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0, HID_QUIRK_NOGET }, { USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, ===kernel 2.6.28=== diff -Naur linux-source-2.6.28/drivers/hid/hid-core.c linux-source-2.6.28.patched/drivers/hid/hid-core.c --- linux-source-2.6.28/drivers/hid/hid-core.c 2009-04-08 06:38:33.000000000 +0200 +++ linux-source-2.6.28.patched/drivers/hid/hid-core.c 2009-04-10 14:15:27.000000000 +0200 @@ -1290,6 +1290,7 @@ { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FORCE3D_PRO) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, diff -Naur linux-source-2.6.28/drivers/hid/hid-ids.h linux-source-2.6.28.patched/drivers/hid/hid-ids.h --- linux-source-2.6.28/drivers/hid/hid-ids.h 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-ids.h 2009-04-10 14:12:44.000000000 +0200 @@ -291,6 +291,7 @@ #define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 +#define USB_DEVICE_ID_LOGITECH_G25_WHEEL 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c diff -Naur linux-source-2.6.28/drivers/hid/hid-lg.c linux-source-2.6.28.patched/drivers/hid/hid-lg.c --- linux-source-2.6.28/drivers/hid/hid-lg.c 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-lg.c 2009-04-10 14:14:17.000000000 +0200 @@ -304,6 +304,8 @@ .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2), .driver_data = LG_FF }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL), + .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), .driver_data = LG_FF2 }, { } ==Enabling force feedback in the kernel== ===Prepare to compile a kernel=== Make sure you have everything needed to compile your kernel : sudo apt-get install fakeroot build-essential makedumpfile libncurses5 libncurses5-dev kernel-package sudo apt-get build-dep linux Get the kernel source code : sudo apt-get install linux-source Now we are ready to start : Prepare your environment: mkdir ~/src cd ~/src tar xjvf /usr/src/linux-source-<version>.tar.bz2 cd linux-source-<version> ===Apply the G25 patch if needed=== Copy the G25.patch file into the source directory ( ~/src ) and patch -p1 <../G25.patch The output should be something like that: patching file drivers/hid/usbhid/hid-ff.c patching file drivers/hid/usbhid/hid-lgff.c patching file drivers/hid/usbhid/hid-quirks.c ===Configure the new kernel=== Get the running kernel configuration: cp -vi /boot/config-`uname -r` .config Adjust the kernel configuration: make oldconfig make menuconfig Go to Device Drivers , and HID Devices and enable the following options Force feedback support (EXPERIMENTAL) PID device support Logitech devices support Logitech Rumblepad 2 support PantherLord/GreenAsia based device support ThrustMaster devices support Zeroplus based game controller support With the 2.6.27 kernel on Ubuntu 8.10, I have to disable paravirtualized guest support otherwise the kernel cleaning fail. This is not needed on 2.6.28 on Ubuntu 9.04 beta (2.6.28.11) Go to Processor type and features and disable the following: Paravirtualized guest support ===Compile and package the new kernel=== make-kpkg clean fakeroot make-kpkg --initrd --append-to-version=-ff kernel-image kernel-headers You now have 2 new package files in ~/src. ===Install the new kernel=== sudo dpkg -i linux-image-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb linux-headers-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb [[Category:Configuration]] [[Category:Review]] [[Category:Operating Systems:Linux]] 2d527db15cc8d0afa5a2e5cb48ab91a5db580be3 Executing VDrift 0 32 1184 482 2012-08-27T13:33:26Z Timo 6 3 Formatting style updates wikitext text/x-wiki Executing VDrift is easier if VDrift is installed. See [[Installing]]. Executing VDrift may make it necessary to adapt VDrift to personal preferences. See [[Configuring VDrift]]. Executing VDrift is different depending on which operating system it is run. So follow the applicable paragraph. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Executing a Not Installed VDrift=== If VDrift was not installed, compilation has still generated a executable binary file. To run VDrift on Windows, you just need to double-click on the file '''vdrift.exe''' in the root VDrift directory. ===Executing an Installed VDrift=== [[Project:Todo|Todo]] </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> [[Project:Todo|Todo]] </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Executing a Not Installed VDrift=== If VDrift was not installed, compilation has still generated a executable binary file under '''build/'''. Execute it with: build/vdrift ===Executing an Installed VDrift=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift In either case VDrift should get executed by vdrift </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> [[Project:Todo|Todo]] </div></div> 86be69edd189ed413862cffe347f4beacb50c649 Talk:Executing VDrift 1 123 1185 2012-08-27T13:33:49Z Timo 6 3 Created page with "Not sure what to do with this page. --~~~~" wikitext text/x-wiki Not sure what to do with this page. --[[User:Timo 6|Timo 6]] ([[User talk:Timo 6|talk]]) 06:33, 27 August 2012 (PDT) 80d5eaf9bd8428ac89bd1dca630d07573955b4e5 IForce FF support 0 39 1187 528 2012-08-27T13:35:55Z Timo 6 3 Timo 6 moved page [[IForce FF Support]] to [[IForce FF support]]: Use lower case for consistency wikitext text/x-wiki == Linux == This was tested with Guillemot Ferrari Force Feedback Wheel USB, however, it should work on any wheel that uses the iforce kernel module. Kernel should be compiled with force feedback support for iforce module (a recent Ubuntu distribution works out of the box, 10.10 was tested, earlier should work too). Follow instructions on [[Setting up force feedback]], the important steps being: compile VDrift from source with forcefeedback support (SVN r3012 (27th Dec 2010) or later), edit ''VDrift.config'' and set up write permissions for ''/dev/input/eventX'' with something similar to: sudo chmod 777 /dev/input/eventX Follow VDrift console output for any force feedback related message; when working properly it should say the force feedback has been initialized. In Ubuntu you can do sudo apt-get install joystick to install test applications fftest and ffcfstress. fftest should work fine (although the effects are somewhat poor), but ffcfstress erroneously reports that the device has no force feedback support. Still, FF should work well in VDrift. In Windows the driver for the discontinued Guillemot wheel is the same as for Thrustmaster Ferrari Force Feedback Racing Wheel, so there is a good chance that the same applies for this particular Thrustmaster wheel. [[Category:Configuration]] db8f7754835712bbd56e5d232b4a24b7a9ec445e 1189 1187 2012-08-27T13:36:54Z Timo 6 3 Formatting style updates wikitext text/x-wiki ==Linux== This was tested with Guillemot Ferrari Force Feedback Wheel USB, however, it should work on any wheel that uses the iforce kernel module. Kernel should be compiled with force feedback support for iforce module (a recent Ubuntu distribution works out of the box, 10.10 was tested, earlier should work too). Follow instructions on [[Setting up force feedback]], the important steps being: compile VDrift from source with forcefeedback support (SVN r3012 (27th Dec 2010) or later), edit ''VDrift.config'' and set up write permissions for '''/dev/input/eventX''' with something similar to: sudo chmod 777 /dev/input/eventX Follow VDrift console output for any force feedback related message; when working properly it should say the force feedback has been initialized. In Ubuntu you can do sudo apt-get install joystick to install test applications fftest and ffcfstress. fftest should work fine (although the effects are somewhat poor), but ffcfstress erroneously reports that the device has no force feedback support. Still, FF should work well in VDrift. In Windows the driver for the discontinued Guillemot wheel is the same as for Thrustmaster Ferrari Force Feedback Racing Wheel, so there is a good chance that the same applies for this particular Thrustmaster wheel. [[Category:Configuration]] e9788c4b22c06254b4d0efc60bc7735c1b30eb43 IForce FF Support 0 124 1188 2012-08-27T13:35:56Z Timo 6 3 Timo 6 moved page [[IForce FF Support]] to [[IForce FF support]]: Use lower case for consistency wikitext text/x-wiki #REDIRECT [[IForce FF support]] 952d9cb4d4f66c8a611d4d2a41e59a7a9799b08c Importing Racer tracks 0 41 1190 536 2012-08-27T13:43:44Z Timo 6 3 Formatting style updates wikitext text/x-wiki ==Directions for importing Racer tracks== {{note|These instructions are meant for Linux}} * Unzip and put racer files in temporary folder ''RACER_TP'' (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces). * Create new folder for track in track editor folder ''TRACKEDITOR_TP''. * Convert all texture names to lowercase in ''RACER_TP'' via find . -type f -name \*.tga|sort -r|awk '{f=tolower($1); if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh * Make folder '''''TRACKEDITOR_TP''/objects/''' * Run the following command: dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces. * Open track editor '''data/tracks/editor.config''' and set active track to ''TRACKEDITOR_TP''. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * cd to the '''''TRACKEDITOR_TP''/objects''' folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy ''TRACKEDITOR_TP'' into the main VDrift tracks folder ''VDRIFT_TP''. Erase '''''VDRIFT_TP''/objects/*.joe''' (since they are in the pack file). * Add '''''VDRIFT_TP''/about.txt''' and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to '''''VDRIFT_TP''/trackshot.png''' (hopefully these png files will be moved into the folders of the individual tracks soon). * Open up all of the texture files in '''''TRACKEDITOR_TP''/objects''' and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the commands mogrify -transparent rgb\(255,0,255\) *.png mogrify -fill rgb\(128,128,128\) -opaque rgba\(255,0,255,0\) *.png This can be scripted to speed things up of course. * Set the correct object properties using the '''trackeditor/listedit''' [[Listedit tool]]. * Done! [[Category:Tracks]] [[Category:Operating Systems:Linux]] [[Category:Review]] 51825d23b8e4da0c698f9e16d72f261219348f91 JOEPack format 0 47 1191 551 2012-08-27T13:49:08Z Timo 6 3 Formatting style updates wikitext text/x-wiki This is a simple file format that just crams a bunch of files together, like a zip file, but without any compression. ==Technical specification== "JoePack" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 1 of the file format. {{note|This documentation was generated by reverse engineering the source code. So there may be errors in evaluation.}} ===Data Type Map=== The following table explicitly defines the various data types used in a JOE file. {| border="1" !Identifier!!Detailed Description |- |unsigned int||32-bit un-signed integer |- |unsigned short||16-bit un-signed integer |- |string[''x'']||Array of characters with length ''x'' |} ===File Header=== This block of information initiates every file. {| border="1" !Data type!!Block offset!!Name!!Description |- |string[8]||0||versionstr |Report the file version that this file conforms to. This specification details version 1 of the format. |- |unsigned int||8||numobjs |This is the number of files contained in the pack |- |unsigned int||12||maxstrlen |The maximum file name length in this pack |} ===File Allocation Table (FAT)=== The FAT consists of ''numobjs'' entries of the following format: {| border="1" !Data type!!Block offset!!Name!!Description |- |unsigned int||0||offset |Offset into the file at which this file starts. This offset is in bytes from the beginning of the file. |- |unsigned int||4||length |The length of the file this entry corresponds to. |- |string[''maxstrlen'']||8||filename |The name of the file stored at this entry. Note that this is not necessarily null terminated - VDrift stores it in a string of length ''maxstrlen + 1'' and pads it with a null character at the end |} ===File Data=== Following the FAT, the JoePack file simply consists of all the data stored sequentially. Seeking to the offset specified in the FAT (from the beginning of the file) will allow you to read that file's data like normal. [[Category:Files]] [[Category:Review]] 5bab805269d1c90436ae8033c6963ec0ada0c172 JOE format 0 48 1192 565 2012-08-27T13:51:18Z Timo 6 3 Formatting style updates wikitext text/x-wiki This format is based on the md2 format but with a few enhanced features. It can be written to using a python export script for the Blender 3D modeling package. ==Technical specification== "JOE" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 3 of the file format. {{note|This documentation was generated by reverse engineering model.h and modle.cpp and inspecting the python blender export script. So there may be errors in evaluation.}} === Data Type Map === The following table explicitly defines the various data types used in a JOE file. {| border="1" !Identifier!!Detailed Description |- |int||32-bit signed integer |- |short||16-bit signed integer |- |short3||Three consecutive shorts forming an array |- |float||32-bit floating-point value. Unsure of the exact format... probably whatever is implemented by x86 machines. |- |float3||Three consecutive floats forming an array. |} === File Header === This block of information initiates every file. {| border="1" !data type!!block offset!!name!!description |- |int||0||magic |'''8441211611'''(0x1F722AADB): number used to identify the file as a JOE file. Currently unchecked by vdrift. |- |int||4||version |report the file version that this file conforms to. This specification details version 3 of the format. |- |int||8||num_faces |every frame is expected to contain the same number of faces (polygons) this value specifies how many. This is currently limited to 32000. |- |int||12||num_frames |Presumably, this details the number of frames used in an animation. Currently constrained to "1" |} === Frame Format === details a single configuration of a model. "File Header.num_frames" frames follow the file header. {| border="1" !data type!!block offset!!name!!description |- |int||0||num_verts |the number of vertices used in this frame |- |int||4||num_textcoords |the number of texture coordinates used in this frame. |- |int||8||num_normals |the number of vertex normals used in this frame. |} after each frame header, you will find * File Header.num_faces Face blocks * num_verts Vertex blocks * num_normals Vertex blocks * num_textcoords Texture Coordinate blocks ===Face Format=== Each frame as "File Header.num_faces" face records immediately following the Frame header (decribed above). A face is basically several lists of indices in to vertex, normal, and text coord arrays described in following sections. For this version, a face is always a triangle ( i.e. a three-vertex polygon ). {| border="1" !data type!!block offset!!name!!description |- |short3||0||vertexIndex |Indeces in to the vertex array. These two constructs together define the location of each corner of the face in 3d space. |- |short3||6||normalIndex |Indeces in to the normals array. These two constructs help define how light sources interact with the face at each corner. Normals also help define which side of a face is "front". |- |short3||12||textureIndex |Indeces in to the texture coordinate array. These two constructs together help define which portions of a texture image map to each corner of the face. Note that in the future there may be a multiple of 3 entries in this array to accomidate applying many textures to a single face. Which images are used as textures by a particular model are defined by convention and explained in [[Car files and formats]] and [[Track files and formats]] |} ===Vertex Format=== A vertex block simply contains a three-element float array. Vertex blocks may have a misleading name because they are used for both vertices and normals. {| border="1" !data type!!block offset!!name!!description |- |float3||0||vertex||A three-element float array defining the X, Y, and Z components of a vertex at offsets 0, 4, and 8 respectively |} ===Texture Coordinate Format=== A texture coordinate is a 2-dimensional coordinate used to map prtions of a texture to a model vertex. {| border="1" !data type!!block offset!!name!!description |- |float||0||u||a value between 0 and 1 indicating a position along the width of the texture |- |float||4||v||a value between 0 and 1 indicating a position along the height of the texture. |} [[Category:Files]] [[Category:Review]] 59704303d237b38775b148f105918b7f29d906ae Listedit tool 0 51 1193 580 2012-08-27T13:53:47Z Timo 6 3 Fix link wikitext text/x-wiki Listedit is part of the [[Track editor]] tools that simplifies working on [[Track files and formats#objects/list.txt|list.txt]] files. It is a command line style program. ==list.txt format== The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location: https://github.com/VDrift/trackeditor/blob/master/listedit/format.txt The numbers next to each of the lines is important to the way the listedit program works. ==Commands== The basic commands are * '''load''' * '''save''' * '''ls''' * '''set''' * '''quit''' * '''addparam''' Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format. ===ls=== The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do: ls 1 sky* To find all of the objects that have the skybox property set to true (1), do: ls 4 1 ===set=== The '''set''' command is similar to '''ls'''. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do: set 1 sky* 4 1 {{note|All of the objects will start with default properties.}} ===addparam=== This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter. [[Category:Tracks]] [[Category:Review]] cd1bce6467527b0e0bd4b602d0c960f395b26475 Logitech G25 support 0 52 1194 597 2012-08-27T13:58:31Z Timo 6 3 Formatting style updates wikitext text/x-wiki ==Windows== The G25 should be fully supported in Windows without any special steps. ==Linux== When initially plugged in, the G25 will be in compatibility mode, which restricts the steering range and disables the clutch pedal and some of the gears on the H-shifter. VDrift includes two tools that can be used to change G25 modes. Either tool can be used; use whichever tool works the best for you. If you want to use force feedback, you'll need to patch your kernel because when set to native mode, the G25 change its product id, and this product id is not known yet by the kernel ( have a look here [[Enabling force feedback in kernel]]) ===usbtool=== The tool can be found in '''tools/usbtool-0.1.tar.gz'''. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example) as well as the swig package. Run <code>./build.sh</code> and then run <code>./usbtool</code> to see the options available. To set the wheel to native mode and the range to 900 degrees, run: sudo ./usbtool g25-set-range-wheel-900 and sudo ./usbtool g25-set-extended-mode This will likely disconnect the joystick driver. To reconnect it run: sudo rmmod joydev;sudo rmmod usbhid;sudo modprobe usbhid ===G25manage=== The tool can be found in '''tools/G25manage'''. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run <code>make</code> to compile the tool, then run: sudo ./G25manage --nativemode and sudo ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. ===LTWheelConf=== LTWheelConf is a new tool based on G25manage: https://github.com/TripleSpeeder/LTWheelConf ===Automatically enable native mode=== If your distribution uses udev (such as Ubuntu), you can put this in '''/etc/udev/rules.d/90-g25-wheel.rules''' to automatically run G25manage when the wheel is plugged in: SUBSYSTEM!="usb", GOTO="g25_rules_end" ACTION!="add", GOTO="g25_rules_end" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c294", RUN+="/usr/local/bin/G25manage --nativemode" #ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --range 900" LABEL="g25_rules_end" # for a joystick detected by the kernel event interface, with a model name "G25_Racing_Wheel change the permissions on the device file # and add a symlink to the event device file KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", SYMLINK+="input/G25event" KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", MODE="0664", GROUP="games" # No deadzone for the wheel on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=0" # No deadzone for the clutch pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=1" # No deadzone for the break pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=2" # No deadzone for the throttle pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=5" After creating that file and copying the G25manage binary to '''/usr/local/bin''', run <code>/etc/init.d/udev reload</code> (or <code>service udev reload</code> on Ubuntu karmic) and you no longer have to manually run G25manage. [[Category:Configuration]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] [[Category:Expand]] 6cde63ecc9632c0ad816643ff2587a602753ee2e Menu system 0 54 1195 651 2012-08-27T14:16:14Z Timo 6 3 Formatting style updates wikitext text/x-wiki The menus are defined by text files in the '''data/skins/''skin_name''/menus/''' directories, where ''skin_name'' is the name of one of the skins [[Skin system]]. The menus are defined in text files in the [[Configfile format]]. Each of the menu "pages" contains a number of menu "widgets", which have a variety of functions. The menu system was designed to be used with any type of controller. Every action may be triggered by a simple button push, except things like text entry. Users should be able to choose if they wish to point and click with the mouse, use the keyboard's arrow keys, or joystick axes and buttons. Keep this in mind when designing or editing menu pages. Other guidelines for menu writing include: * Try to keep the layouts similar to other menus in the skin. * Keep the menus simple and break them up into subgroups where possible. * Put the most used functions closer to the main menu, and the lesser used things in deeper submenus. * Do not put too many widgets on any one page. * Always check to make sure navigating a menus with the keyboard works in the order expected. ==Adding Menus== To add a new menu, simply create a new text file under '''data/skins/''skin_name''/menus/''' with the name of the file the same as the name of the menu in camelcase. ===Writing a Menu=== Now you need to define the new menu. Let's look at the Options menu. The game needs to know a little about the menu itself, so the first few lines of every menu look something like this: name = Options widgets = 5 background = gui/box.png dialog = false The <code>name</code> field should be the same as the filename. The <code>widgets</code> field tells the game how many widgets to load from this menu file (it starts at 0, and stops at <code>widgets - 1</code>). The <code>background</code> field tells the game which graphic to use as the menu background. The <code>dialog</code> tells the game if this is a dialog box or not, but right now this option has no effect (dialog boxes are drawn as full size menus). ===Adding Widgets=== Next, you will need to add some widget definitions to your menu. Here's the format for a label widget, this example taken from the Options menu: [ widget-00 ] type = label name = OptionsLabel text = Options center = 0.5, 0.1 width = auto height = auto fontsize = 9 enabled = 0 selected = 0 default = 0 cancel = 0 The first line is the widget ID. This is the identification number of this widget on this menu page. The number also dictates the order in which the menu will be traversed if you use the arrow keys to move through it. The <code>type</code> field tells VDrift what kind of widget it is. <code>name</code> is a non-numeric identifier. <code>text</code> is the text that will appear on the label. <code>center</code> is the relative position of the widget on the screen. <code>width</code> and <code>height</code> are the relative width and height of the label (here we tell VDrift to figure it out automatically, this is generally a good idea). <code>fontsize</code> is the size to draw the text, the value 9 is pretty big, which is good because this label is the menu title. The next values, <code>enabled</code>, <code>selected</code>, <code>default</code>, and <code>cancel</code>, are boolean values. These are available in every widget and tell how the user can interact with it. <code>enabled</code> allows the user to use the widget. A label has no function so in this case it is turned off. <code>selected</code> indicates if this item should be the one selected when the menu is displayed for the first time. Since a user can't use a label, it shouldn't be selected, so this is off too. <code>default</code> is usually used for OK buttons, or buttons that need to trigger saving all the values on the page when they're pressed. <code>cancel</code> is for Cancel buttons and indicates if this is the button to be pressed when Escape is pressed on this menu, and discards any changes made on the menu. ===Making the Menus Accessible from Other Menus=== Navigation through the menu system is done using buttons. Let's say for example you are creating a menu called GameOptions which will allow users to change certain aspects of the gameplay (perhaps such as difficulty level). This menu would be accessed from the existing Options menu. So you'll need to add a button for GameOptions to the Options menu. Here's an example button widget that could do this. [ widget-01 ] type = button name = GameOptionsButton text = Game tip = Change game settings. action = GameOptions center = 0.5, 0.3 color = 0.0, 0.0, 0.8 width = auto height = auto fontsize = 7 enabled = 1 selected = 1 default = 0 cancel = 0 The first thing you notice is all the properties it shares with the label widget. In this case let's say the button is now the first one on the Options menu. The <code>type</code> is now "button" appropriately. Some new options available to a button are: <code>tip</code>, which shows a description of the widget at the bottom of the screen; <code>action</code>, which dictates what happens when the button is pressed (in this case the name of the menu to go to, in other cases, a special function name that tells the game to do something); and finally <code>color</code>, which allows you to change the color of the text in %R, %G, %B format. This particular button has 80% blue text. Take a look at some of the existing menu entries for more examples. ==Warning== The menu system is still a little light on the error checking. Therefore care must be taken when writing menus or editing them that you don't miss something, or the menu may not work at all, may be unreachable or inescapable, or may even cause the game to crash. [[Category:Files]] [[Category:Review]] 248d3e628a556eb627dd6ffa821369203fb9af8a Numerical Integration 0 55 1196 694 2012-08-27T14:19:40Z Timo 6 3 Fix image links wikitext text/x-wiki Note: the old version of this page is here: [[Old Numerical Integration]] Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result. ==Integrator Order== The order of a numerical integrator is a convenient way to approximate the accuracy of an integrator. All integrators presented here have an order of at least one, which means that they eventually converge to the correct solution if the timestep is small enough. First order methods converge to the exact solution in a linear relation to the timestep. Higher order methods converge to the correct solution in a power relation to the timestep. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic explicit method for numerical integration for ordinary differential equations. real a = system.GetAcceleration(state); state.x += state.v * dt; state.v += a * dt; ==SUVAT== The "suvat" method takes its name from the variables in the equations of motion. This is a first order method that is very similar to the Euler method. The only difference is the addition of an acceleration term to the equation for the change in position. real a = system.GetAcceleration(state); state.x += state.v * dt + a*dt*dt*0.5; state.v += a * dt; ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of systems of undamped oscillators. Due to this property, it preserves energy better than the standard Euler method and so is often used in simulations of orbital mechanics. It is a first order integrator. real a = system.GetAcceleration(state); state.v += a * dt; state.x += state.v * dt; ==Basic Verlet/Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. It is a second order integrator. Unfortunately, this method is unsuitable for simulations where the acceleration is dependent on velocities, such as with a damper. The modified verlet variant below uses some tricks to try to get around this limitation, but this method will only provide first-order accuracy. if (!have_oldaccel) oldaccel = system.GetAcceleration(state); state.x += state.v*dt + 0.5*oldaccel*dt*dt; state.v += 0.5*oldaccel*dt; real a = system.GetAcceleration(state); state.v += 0.5*a*dt; oldaccel = a; have_oldaccel = true; ==Improved Euler/Trapezoidal/Bilinear/Predictor-Corrector/Heun== The so-call "Improved Euler" method, also known as the trapezoidal or bilinear or predictor/corrector or Heun Formula method, is a second order integrator. STATE predictor(state); predictor.x += state.v * dt; predictor.v += system.GetAcceleration(state) * dt; STATE corrector(state); corrector.x += predictor.v * dt; corrector.v += system.GetAcceleration(predictor) * dt; state.x = (predictor.x + corrector.x)*0.5; state.v = (predictor.v + corrector.v)*0.5; ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known fourth-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Note that the evaluate() function calls the system's acceleration function. DERIVATIVE a = evaluate(state, 0, DERIVATIVE(), system); DERIVATIVE b = evaluate(state, dt*0.5, a, system); DERIVATIVE c = evaluate(state, dt*0.5, b, system); DERIVATIVE d = evaluate(state, dt, c, system); const float dxdt = 1.0/6.0 * (a.dx + 2.0*(b.dx + c.dx) + d.dx); const float dvdt = 1.0/6.0 * (a.dv + 2.0*(b.dv + c.dv) + d.dv); state.x = state.x + dxdt*dt; state.v = state.v + dvdt*dt; ==Performance Comparison== In most simulations, calculation of the system's acceleration function is computationally very expensive. Therefore, we can rank the integrators by how many times they evaluate the system's acceleration function: {| cellspacing="0" border="1" !Method !Evaluations of the Acceleration Function |- !Euler |1 |- !SUVAT |1 |- !NSV |1 |- !Modified Verlet |1 |- !Improved Euler |2 |- !RK4 |4 |} Because of the extra evaluations of the acceleration function, the Improved Euler method is about twice as slow as the Euler method, and the RK4 method is about four times as slow as the Euler method. Another way to look at this is that we could run the Euler method with a 0.001 second timestep with the same performance as running the RK4 method with a 0.004 second timestep. ==Detailed comparison== For comparing these algorithms I used a damped spring-mass system because it can be difficult to integrate when the spring is very stiff or the damping is high, but it can be analytically solved so I have something to compare the integrators to. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Zeta is the damping ratio. The analytic solution can be obtained with the following calculations: real zeta = c / (2.0 * sqrt(k*m)); real w = sqrt(k/m); if (zeta < 1.0) //underdamped { real wd = w*sqrt(1.0-zeta*zeta); real A = ic.x; real B = (1.0/wd)*(zeta*w*ic.x+ic.v); real out = (A*cos(wd*time)+B*sin(wd*time))*exp(-zeta*w*time); return out; } else if (zeta > 1.0) //overdamped { real beta = c/m; real rminus = 0.5*(-beta-sqrt(beta*beta-4.0*w*w)); real rplus = 0.5*(-beta+sqrt(beta*beta-4.0*w*w)); real A = ic.x - (rminus*ic.x - ic.v)/(rminus-rplus); real B = (rminus*ic.x-ic.v)/(rminus-rplus); real out = A*exp(rminus*time)+B*exp(rplus*time); return out; } else //critically damped { real A = ic.x; real B = ic.v + w*ic.x; return (A + B*time)*exp(-w*time); } The spring constant (k) was fixed at 600,000. Mass was set to 168 kg. Initial conditions were X = 1 m and V = 0 m/s. The damping coefficient was calculated depending on the damping ratio (zeta). These values were chosen to be similar to what may be encountered in VDrift. Timesteps were varied between 0.001 seconds and 0.020 seconds. To account for performance differences, the improved Euler method was handicapped with a timestep twice as large as the indicated timestep, and the RK4 method was handicapped with a timestep four times as large as the indicated timestep. The mean absolute error is plotted for each integrator at each timestep. ===Critically Damped System=== First, a damping ratio of 1 is simulated. Systems such as car suspensions are often critically damped. ====Stability==== [[File:zeta1.png]] Reading left to right along the timestep increments, the RK4 integrator's results become unacceptable first at a timestep of 0.009 seconds (remember that this actually means a 0.036 second timestep due to the performance handicap of the RK4 method). The NSV is next, followed by the modified verlet and improved euler methods. The suvat method is second to last to become unacceptable and the euler method is acceptable even with a 0.020 second timestep. ====Accuracy==== [[File:zeta1closeup.png]] Looking at a closeup of the results, it becomes apparent where the strengths of higher order integrators lie. At 0.002, the RK4 (actual timestep 0.008) and improved euler (actual timestep 0.004) methods beat out all of the other methods. Of the first order methods at 0.002, from most to least accurate they are: modified verlet, suvat, euler, and nsv. From these results we can conclude that when the system is not stiff (that is, the forces involved are small relative to the timestep), higher order integrators are most accurate, even after penalizing their lower performance. ===Overdamped System Stability=== Here a damping ratio of 2 is simulated. Systems with a lot of friction, such as tire simulations, are often overdamped systems. [[File:zeta2.png]] In order from least to most stable: rk4, improved euler, nsv, modified verlet, suvat, euler. ===Underdamped System Stability=== Here a damping ratio of 0.1 is simulated. Oscillating systems such as planetary orbits are underdamped. [[File:zeta0.1.png]] In order from least to most stable: euler, suvat, improved euler, rk4, nsv, modified verlet. We can see why systems of orbits and molecular dynamics are often simulated with NSV or velocity verlet methods: they maintain stability very well here. ==Summary== Let's rank each integrator in terms of accuracy, and then stability for critically-, over-, and under-damped systems. One is the best. Recall that because we already penalized improved euler and RK4 methods for performance, we can consider each method to have roughly the same performance. {| cellspacing="0" border="1" !Method !Accuracy !Stability: critically-damped !Stability: over-damped !Stability: under-damped |- !Euler |5 |1 |tied 1/2 |6 |- !SUVAT |4 |2 |tied 1/2 |5 |- !NSV |6 |4 |tied 3/4 |tied 1/2 |- !Modified Verlet |3 |4 |tied 3/4 |tied 1/2 |- !Improved Euler |2 |3 |5 |4 |- !RK4 |1 |5 |6 |3 |} Note that no integrator is clearly the worst or clearly the best; they all have strengths and weaknesses. If you are simulating a non-stiff system that will generate only small forces relative to your timestep, the RK4 method is the winner. If you're simulating a strictly stiff underdamped system, use the NSV or modified verlet methods. If you're simulating a strictly stiff overdamped or critically damped system, use the Euler or SUVAT methods. If you have a combination of needs, some compromise is called for. VDrift requires stability in the face of stiff overdamped systems, and currently uses the SUVAT method due to slightly improved accuracy over the euler method. [[Category:Development]] d3685658e97c3429f79b16a4899ec5dadf8338ea Old Method of Compiling Bullet 0 58 1197 724 2012-08-27T14:21:23Z Timo 6 3 Formatting style updates wikitext text/x-wiki {{note|These are the old directions of compiling Bullet. The directions for the current version are on the [[Compiling]] page.}} The Bullet physics library must be manually built on versions of VDrift prior to SVN R2321 and with releases up to and including the 8/5/08 release. A preferred version of the library is included with the VDrift source distribution as a .tgz file. On linux, bullet can be compiled like this (replace the X with whatever bullet version is included with the VDrift source distribution): tar zxvf bullet-X.tgz cd bullet-X Then, proceed as below using either jam or cmake as your build tool: ==Jam== ./autogen.sh ./configure jam bulletcollision bulletmath ==CMake== cmake . make ==autotools== ./autogen.sh ./configure make These steps should put the bullet libraries into a spot in the bullet-X tree that the VDrift build files are expecting. {{note|It is not necessary to install the bullet library on your system. In fact, installed versions of bullet may conflict with the version included with VDrift.}} [[Category:Historical]] d1a0df9c6a9a9cba1ff493288658f81efaeef30b Old Method of Compiling on FreeBSD 0 59 1198 729 2012-08-27T14:24:02Z Timo 6 3 Duplicated by Compiling wikitext text/x-wiki #REDIRECT [[Compiling]] 7c22500cd3e5b4a771796398b1fb96a5b0d00d2a Old Method of Compiling on Windows 0 62 1199 796 2012-08-27T14:26:01Z Timo 6 3 Duplicated by Compiling wikitext text/x-wiki #REDIRECT [[Compiling]] 7c22500cd3e5b4a771796398b1fb96a5b0d00d2a Old Method of Compiling on Mac OS X 0 61 1200 751 2012-08-27T14:28:36Z Timo 6 3 Duplicated by Compiling wikitext text/x-wiki #REDIRECT [[Compiling]] 7c22500cd3e5b4a771796398b1fb96a5b0d00d2a Old Method of Installing on FreeBSD 0 63 1201 805 2012-08-27T14:34:26Z Timo 6 3 Duplicated by Installing wikitext text/x-wiki #REDIRECT [[Installing]] aac4a73256b7436383023b3da703be5898c8798d Old Method of Installing on Mac OS X 0 64 1202 820 2012-08-27T14:35:06Z Timo 6 3 Duplicated by Installing wikitext text/x-wiki #REDIRECT [[Installing]] aac4a73256b7436383023b3da703be5898c8798d Old Method of Installing on Windows 0 65 1203 832 2012-08-27T14:35:54Z Timo 6 3 Duplicated by Installing wikitext text/x-wiki #REDIRECT [[Installing]] aac4a73256b7436383023b3da703be5898c8798d Old Numerical Integration 0 66 1206 835 2012-08-27T15:22:56Z Timo 6 3 Fix image links wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[File:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[File:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[File:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[File:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[File:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[File:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[File:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[File:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[File:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. [[Category:Historical]] 89cd5cab551367aa4dab930c927631672c6eb2eb Packaging on Linux 0 69 1208 854 2012-08-27T15:38:46Z Timo 6 3 Duplicated by Packaging wikitext text/x-wiki #REDIRECT [[Packaging]] e983baf564e30a05c099fb597587857ad0af613f Packaging on Mac OS X 0 70 1209 857 2012-08-27T15:40:04Z Timo 6 3 Duplicated by Packaging wikitext text/x-wiki #REDIRECT [[Packaging]] e983baf564e30a05c099fb597587857ad0af613f Packaging on Windows 0 71 1210 859 2012-08-27T15:41:08Z Timo 6 3 Duplicated by Packaging wikitext text/x-wiki #REDIRECT [[Packaging]] e983baf564e30a05c099fb597587857ad0af613f Profiling 0 72 1211 863 2012-08-27T16:22:29Z Timo 6 3 Formatting style updates wikitext text/x-wiki There are two profiling methods used to evaluate performance of VDrift code. VDrift provides its own in-game profiling system, or it may produce output suitable for the GNU gprof profiler. ==In-game Profiling== When VDrift is run with the <code>-profiling</code> command-line option, certain parts of the game code (determined by the developers and hard-coded in the source) are evaluated as the game runs. vdrift -profiling During execution, each profiled subsystem of the game is listed along the left side of the game window, along with the amount of time spent on that subsystem during the last tick. After VDrift exits, summarized profiling information is output to the '''stdout''' stream, including the percentage of time spent in each subsystem. ==Profiling with gprof== When VDrift is [[Compiling|compiled]] with the '''profiling''' [[Using SCons|option]] enabled, it produces output suitable for examination with the gprof tool. Compiling with the '''profiling''' option enabled: scons profiling=1 Run VDrift: build/vdrift After exiting, run gprof on the executable: gprof build/vdrift [[Category:Development]] 1caa8e8cfd1604255b76df2488a3af548a8ef34e Setting up force feedback 0 76 1212 895 2012-08-27T16:26:06Z Timo 6 3 Formatting style updates wikitext text/x-wiki Force feedback is currently only supported on Linux. ==Prerequisites== * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in '''kernel-source/drivers/usb/input/hid-ff.c''' * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be '''/dev/input/eventX'''). * write permission to '''/dev/input/eventX''' * VDrift SVN r1547 or later If you need to recompile your kernel to enable force feedback, you can have a look here [[Enabling force feedback in kernel]] ==Enabling force feedback in VDrift== Once you've met the prerequisites, recompile vdrift like this: scons force_feedback=1 Now open your [[VDrift.config]]. Find the section <code>[ joystick ]</code> and add the following line to the joystick section somewhere: ff_device = /dev/input/event0 Change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. [[Category:Configuration]] [[Category:Operating Systems:Linux]] [[Category:Review]] 784de1ddf8ba4afe1dfb00841c606c919f200489 Sound/Audio Development 0 78 1213 921 2012-08-27T16:35:06Z Timo 6 3 Formatting style updates and link fix wikitext text/x-wiki These are some preliminary recordings of a miata. Discussion is welcomed here and in the forum thread: [http://vdrift.net/Forum/showthread.php?tid=799 Collecting audio] ==Notes== Some notes on the sounds: *Inside - 2 microphones in a 180 degree stereo setup behind the driver headrest. *Behind - 2 Microphones in a 45 degrees stereo setup 7 feet behind the car. *Some filenames have odd case, I'll make all lowcase standard in the future. *I did very little to the raw audio other than a little compression to lessen the dynamic range. *Some of these are very quiet, such as the 1k inside. ==Miata sounds== The .wav files for each recording: ===Inside=== *[http://fangbaby.com/share/vdrift/01%20-%201k%20inside.wav 1k inside] *[http://fangbaby.com/share/vdrift/02%20-%202k%20inside.wav 2k inside] *[http://fangbaby.com/share/vdrift/03%20-%203k%20inside.wav 3k inside] *[http://fangbaby.com/share/vdrift/04%20-%204k%20inside.wav 4k inside] *[http://fangbaby.com/share/vdrift/05%20-%205k%20inside.wav 5k inside] *[http://fangbaby.com/share/vdrift/06%20-%206k%20inside.wav 6k inside] *[http://fangbaby.com/share/vdrift/07%20-%207k%20inside.wav 7k inside] *[http://fangbaby.com/share/vdrift/08%20-%20Revlimit%20Inside.wav RevLimit inside] *[http://fangbaby.com/share/vdrift/09%20-%20750to7k%20inside.wav 750to7k inside] ===Behind=== *[http://fangbaby.com/share/vdrift/10%20-%201k%20Behind.wav 1k behind] *[http://fangbaby.com/share/vdrift/11%20-%202k%20Behind.wav 2k behind] *[http://fangbaby.com/share/vdrift/12%20-%203k%20Behind.wav 3k behind] *[http://fangbaby.com/share/vdrift/13%20-%204k%20Behind.wav 4k behind] *[http://fangbaby.com/share/vdrift/14%20-%205k%20Behind.wav 5k behind] *[http://fangbaby.com/share/vdrift/15%20-%206k%20Behind.wav 6k behind] *[http://fangbaby.com/share/vdrift/16%20-%207k%20behind.wav 7k behind] *[http://fangbaby.com/share/vdrift/17%20-%20Revlimit%20behind.wav RevLimit behind] *[http://fangbaby.com/share/vdrift/18%20-%20Start%20Behind.wav Start behind] *[http://fangbaby.com/share/vdrift/19%20-%20Stop%20Behind.wav Stop behind] ===Moving Inside=== *[http://fangbaby.com/share/vdrift/20%20-%20Moving.wav Moving Inside] *[http://fangbaby.com/share/vdrift/21%20-%20Moving2.wav More Moving Inside] [[Category:Cars]] [[Category:Development]] 6ca5ad60f00dfc7184527710b00d016611e041b1 Testing 0 81 1214 937 2012-08-27T16:37:21Z Timo 6 3 Formatting style updates wikitext text/x-wiki VDrift includes a very simple unit testing framework for C++ code. It is derived from [http://quicktest.sourceforge.net/ QuickTest]. ==Running the Tests== To run unit tests, the test executable must first be built. ===Building=== In the VDrift source root, run: scons test ===Executing=== The executable is called '''vdrift-test''' and is compiled to the '''build/''' directory in the root of the VDrift source tree. To run it, simply do: build/vdrift-test ===Results=== The results are written to STDOUT. An example: [-------------- RUNNING UNIT TESTS --------------] src/matrix4.cpp(26): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0) src/matrix4.cpp(27): 'matrix4_test' FAILED: value1 (10) should be close to value2 (20) src/matrix4.cpp(28): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (-1) src/matrix4.cpp(33): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0) src/matrix4.cpp(34): 'matrix4_test' FAILED: value1 (10) should be close to value2 (0) src/matrix4.cpp(35): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (1) Results: 29 succeeded, 1 failed [-------------- UNIT TESTS FINISHED -------------] ==Writing New Tests== Consult the [http://quicktest.sourceforge.net/usage.html QuickTest How to Use It] and the [http://quicktest.sourceforge.net/api.html QuickTest API Reference] for details on how to write unit tests using QuickTest. ===Example Tests=== To look at some example test code already in VDrift, look at '''src/*.cpp''' files which contain the macro <code>QT_TEST</code>. [[Category:Development]] [[Category:Expand]] 13a6ea417b84c7078a87859d3809071c4b6faab1 Tire parameters 0 82 1215 946 2012-08-27T16:42:15Z Timo 6 3 Formatting style updates wikitext text/x-wiki Example from '''carparts/tire/touring''': restitution = 0.1 tread = 0.25 rolling-resistance = 1.3e-2, 6.5e-6 # Lateral force a0=1.55 a1=-55 a2=1750 a3=1900 a4=7.2 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.65 b1=-110 b2=1800 b3=23.3 b4=410 b5=0.075 b6=0 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 # Aligning moment c0=2.2 c1=-4.3 c2=-4.4 c3=-1.9 c4=-9.6 c5=0.0225 c6=0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 Restitution defines tire restitution (not implemented atm). The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm There is a graphical tire parameters editor to adjust/review the parameters: http://svn.vdrift.net/viewvc.cgi [[Category:Cars]] [[Category:Files]] [[Category:Reformat]] 69f0430017fe5fc287b08f510f7db2f7d83944f1 User settings directory 0 85 1216 1020 2012-08-27T16:45:10Z Timo 6 3 Formatting style updates wikitext text/x-wiki VDrift stores user settings (mostly in [[VDrift.config]]) and other information in a special directory on the computer's drive. Usually it is located within the user's personal assigned file space, to ensure that the user will have easy access to the files (for backup or other purposes), and that VDrift will be allowed write privileges to the directory. ==Location== The location of the settings directory is chosen based on the best location for the user's operating system. In the following subsections, ''username'' represents the user's login name on the computer. {| |- |'''Operating System''' |'''Location''' |- |Windows XP |<code>C:\Documents and Settings\''username''\My Documents\My Games\VDrift</code> |- |Windows Vista/7 |<code>C:\Users\''username''\My Documents\My Games\VDrift</code> |- |OS X |<code>/Users/''username''/Library/Preferences/VDrift</code> |- |Linux |<code>/home/''username''/.vdrift</code> |- |FreeBSD |<code>/home/''username''/.vdrift</code> |} {{note|If VDrift is run as root on Linux/FreeBSD, the root user's home directory is used instead, which is usually '''/root'''. It is not recommended that VDrift is run as root.}} {{note|If VDrift is run as Administrator on Windows XP, the path will be '''C:\Documents and Settings\Administrator\My Documents\My Games\VDrift'''. It is not recommended that VDrift is run as Administrator.}} [[Category:Files]] [[Category:Operating Systems:Linux]] [[Category:Operating Systems:FreeBSD]] [[Category:Operating Systems:Windows]] [[Category:Operating Systems:Mac OS X]] 6e8631755a252559b0ef2a3dbe6638502b003138 1246 1216 2012-09-01T10:30:31Z Timo 6 3 Update categories wikitext text/x-wiki VDrift stores user settings (mostly in [[VDrift.config]]) and other information in a special directory on the computer's drive. Usually it is located within the user's personal assigned file space, to ensure that the user will have easy access to the files (for backup or other purposes), and that VDrift will be allowed write privileges to the directory. ==Location== The location of the settings directory is chosen based on the best location for the user's operating system. In the following subsections, ''username'' represents the user's login name on the computer. {| |- |'''Operating System''' |'''Location''' |- |Windows XP |<code>C:\Documents and Settings\''username''\My Documents\My Games\VDrift</code> |- |Windows Vista/7 |<code>C:\Users\''username''\My Documents\My Games\VDrift</code> |- |OS X |<code>/Users/''username''/Library/Preferences/VDrift</code> |- |Linux |<code>/home/''username''/.vdrift</code> |- |FreeBSD |<code>/home/''username''/.vdrift</code> |} {{note|If VDrift is run as root on Linux/FreeBSD, the root user's home directory is used instead, which is usually '''/root'''. It is not recommended that VDrift is run as root.}} {{note|If VDrift is run as Administrator on Windows XP, the path will be '''C:\Documents and Settings\Administrator\My Documents\My Games\VDrift'''. It is not recommended that VDrift is run as Administrator.}} [[Category:Files]] f51f9ee105b8d2cf56f4eb297405b07dceedf152 VDrift.config 0 88 1217 1039 2012-08-27T16:52:33Z Timo 6 3 Formatting style updates wikitext text/x-wiki '''VDrift.config''' is the main user settings file for VDrift. It is in the [[configfile format]]. It is not the only file which VDrift uses for storing user settings (see also [[configuring the controls]]); however, it is the one which contains most of the settings important to users. VDrift does not use any kind of registry or configuration database. The options available to this configuration file are the ones defined in [[options.config]]. ==Location and Defaults== '''VDrift.config''' is located inside the [[user settings directory]]. The default '''VDrift.config''' is located in '''data/settings/VDrift.config'''. If VDrift fails to start, the next time it runs, it will move the user's current '''VDrift.config''' to '''VDrift.config.backup''' and make a new '''VDrift.config''' from the default one. ==Example== This is an example '''VDrift.config''' file. [control] autoclutch = true autotrans = true button_ramp = 5 mousegrab = true speed_sens_steering = 1 [display] FOV = 45 anisotropic = 0 antialiasing = 0 bloom = true camerabounce = 1 contrast = 1 depth = 16 fullscreen = true height = 1050 input_graph = true language = English lighting = 0 mph = true normalmaps = true racingline = true reflections = 1 shaders = true shadow_distance = 1 shadow_quality = 1 shadows = true show_fps = true show_hud = true skin = simple texture_size = medium trackmap = true view_distance = 1000 width = 1680 zdepth = 16 [game] ai_difficulty = 1 antilock = true camera_mode = chase number_of_laps = 1 opponent = XS opponent_color = 1,1,1 opponent_color_blue = 1.000000 opponent_color_green = 0.000000 opponent_color_red = 0.000000 opponent_paint = 00 player = XS player_color = 1,1,1 player_color_blue = 1.000000 player_color_green = 0.000000 player_color_red = 0.000000 player_paint = 00 record = false reverse = false selected_replay = 0 track = paulricard88 traction_control = true [joystick] calibrated = false ff_device = /dev/input/event0 ff_gain = 2 ff_invert = false hgateshifter = false two_hundred = false type = joystick ==Options== ===Control section=== For information on the Control settings, see [[Configuring the controls]]. ===Display section=== See [[Configuring the display]] for detailed descriptions of each option. ===Game section=== See [[Starting the game]] for detailed descriptions of each option. ===Joystick section=== For information on the Joystick settings, see [[Configuring the controls]]. ===Sound section=== See [[Configuring the sound]] for more information. [[Category:Files]] [[Category:Configuration]] 49d1c02f09df2c925ccae073eebae63ef2a54c7d Car modeling tutorial 0 8 1218 72 2012-08-27T17:15:35Z Timo 6 3 Remove double redirect wikitext text/x-wiki #REDIRECT [[3D modeling]] 1965cfe895042bc1d467157c044744eaf37b0427 Track modeling tutorial 0 83 1219 956 2012-08-27T17:15:56Z Timo 6 3 Remove double redirect wikitext text/x-wiki #REDIRECT [[3D modeling]] 1965cfe895042bc1d467157c044744eaf37b0427 List of tracks 0 50 1220 572 2012-08-27T17:16:14Z Timo 6 3 Remove double redirect wikitext text/x-wiki #REDIRECT [[Getting tracks]] b6a76c7062a0357e5068c6daf5c4c08ef2432835 Installing on FreeBSD 0 43 1221 540 2012-08-27T17:16:47Z Timo 6 3 Remove double redirect wikitext text/x-wiki #REDIRECT [[Installing]] aac4a73256b7436383023b3da703be5898c8798d Installing on Mac OS X 0 45 1222 544 2012-08-27T17:17:00Z Timo 6 3 Remove double redirect wikitext text/x-wiki #REDIRECT [[Installing]] aac4a73256b7436383023b3da703be5898c8798d Installing on Windows 0 46 1223 546 2012-08-27T17:17:12Z Timo 6 3 Remove double redirect wikitext text/x-wiki #REDIRECT [[Installing]] aac4a73256b7436383023b3da703be5898c8798d Help:Editing 12 92 1224 1106 2012-08-27T17:19:16Z Timo 6 3 /* Links */ Fix link wikitext text/x-wiki This article intends to give an idea of how to help improve this wiki. To see what needs to be done, see the [[Project:Todo|todo list]]. ==Write!== The success of a site like this depends on its contributors. If you see a mistake, no matter how small, edit the article and fix it. If you know that something is missing, please write about it, and if you don't know enough put something on the discussion page reminding others to add this information. ==Discussion pages== Each article has a discussion page. Use this page to ask questions or suggest changes to a page. For instance, if you're not sure if something is right or not, and want to make sure before editing yourself, the discussion page is ideal. Likewise if there is something missing from a page that you don't know much about, the discussion page is a good place to put in the request. Don't hesitate to use these, and don't forget to sign your username with '''<nowiki>--~~~~</nowiki>'''. ==New articles== If you'd like to create a new article and aren't sure where to put it, just give it a general name. We can always move or reorganize pages later. It's better to get the information down and worry about the details later. When adding a new article, put something in the notes telling where you got the information (for instance if you copied it from somewhere else). ==Editing articles== When possible, edit only the section that you'd like to change, rather than the whole article. This makes it less likely for two authors to be editing the same page at the same time. This also makes changes more atomic, and the section name is automatically added to the article editing summary, which makes it easier to see what part of the article was changed. On the topic of summaries, please try to remember to add a summary whenever editing an article. It is somewhat annoying to have to check the diffs every time someone makes an edit. Just a few words will do, like "fixed spelling of 'pulchritudinous'" or "restructured for better flow". To help keep the summaries simple, its best to also keep the edits simple. Don't try to totally rewrite an article in one edit, unless it's very short. If there's a logical way to break up the edits do so. ==Formating== For detailed notes on the syntax for formatting the wiki, see http://www.mediawiki.org/wiki/Help:Formatting. The following gives some instructions on our preferred style for certain things. ===Notes=== If there's something you'd like to draw the reader's attention to, you can use the note template. Here's an example of how to use it: <nowiki>{{note|Notes are hard to miss}}</nowiki> {{note|Notes are hard to miss.}} ===Sections=== Articles can be split into sections with sub-sections. If there are more than 3 sections the wiki generates a nice table of contents. To make a top-level section, put the section name between a set of double equal signs, like this: ==Overview== A section of this would have one more equal sign on each side: ===Sub-section 1=== See examples on this page: [[Help:Editing#Formating|Formating]], [[Help:Editing#Sections|Sections]]. There may be sub-sub sections, and sub-sub-sub sections, and so on. Don't get too carried away... ===Links=== The wiki generates links automatically in many cases. To link to something on an external site, use single brackets, with the URL first, followed by the link text, like this: <nowiki>[http://vdrift.net/ VDrift]</nowiki> [http://vdrift.net/ VDrift] To put a raw URL in an article, simply insert it without any brackets, it will automatically be turned into a link. <nowiki>http://vdrift.net/</nowiki> http://vdrift.net/ To make internal links, simply put the page's name in double square brackets. You don't have to put in any underscores as are added to the URL of the page. Here's a link to this page: <nowiki>[[Contribution]]</nowiki> [[Contribution]] To give a link of this nature a different link text, add a pipe character ("|") after the page name, and then put the link text: <nowiki>[[VDrift:About|About the wiki]]</nowiki> [[VDrift:About|About the wiki]] ===Unwritten pages=== If there's a topic that really deserves its own article, but there is no information on the wiki about it yet, just add a link to the article where it should go. This will encourage others to write the page. <nowiki>We really need a [[Time machine]].</nowiki> We really need a [[Time machine]]. ===Code blocks=== The wiki makes it very simple to add blocks of pre-formatted text. Simply add a space before the lines which should be part of the code block. <nowiki> cd vdrift</nowiki> See above for an example! ===Talking about files=== When referencing file or directory names, it is important to set them apart from the other text so that the reader doesn't confuse sentence punctuation and other words with the directory or file name. The best way to address this is to make the text bold, by adding three apostrophes before and after the text: <nowiki>VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''.</nowiki> VDrift's main menu in the simple skin is '''data/skins/simple/menus/Main'''. ===Menu items=== When talking about menus items, to reduce the number of words you have to write, just use arrows in between the items: Go to File -> Insert -> Image. Go to File -> Insert -> Image. ===Buttons=== When talking about buttons, put quotation marks around them: Click "Updates" then "Manage Cars". Click "Updates" then "Manage Cars". ===Collapsible sections=== If a page is getting very long, and has sections only relevant people (for example only Linux users), consider using collapsible sections by using the following code: <nowiki><div class="mw-collapsible mw-collapsed"> //Delete mw-collapsed to make the section start expanded. Title(optional) <div class="mw-collapsible-content"> Content </div></div></nowiki> <div class="mw-collapsible mw-collapsed"> Title (optional) <div class="mw-collapsible-content"> Content </div></div> ==Nevertheless== If you feel like you don't understand the above guidelines, don't worry about them too much. Go ahead and write your article or fix another, someone will probably clean it up later if there are mistakes or areas for improvement. 36366c9d2de4ac7aff885fa612388cb1317f0284 Requirements 0 97 1225 1115 2012-08-27T17:20:15Z Timo 6 3 /* Storage */ Fix link wikitext text/x-wiki VDrift has a high quality simulation engine and graphics so needs a fairly decent computer for it to run the best it can. The following hardware requirements are what can be reasonable expect to have no problems playing the game, but we don't have a comprehensive test suite so feel free to test VDrift on your own computer and tell us the results! ==Processor== VDrift requires a relatively fast CPU. A 2 GHz or better clock speed is recommended, although it should be possible to run VDrift with a 1 GHz or better CPU. ==Graphics== VDrift requires a recent nVidia or ATI graphics card. Intel graphics cards are not recommended. A nVidia GeForce 7-series or ATI Radeon X1000-Series card is recommended in order to enable all the visual effects. By reducing or disabling some of the [[Configuring the display|display options]], it should be possible to play VDrift with a nVidia GeForce 2 or an ATI Radeon 7000. You should install newest version of the device drivers for your graphics card. ==Memory== VDrift can consume about 300 MB of memory on a typical run so 512 MB is the minimum requirement but 1 GB or more is recommended, especially for larger tracks. ==Storage== The basic [[Downloading|release]] is usually about 650 MB, so you must have at least 700 MB free space before you begin, and more if you wish to add more cars or tracks. While the source code is less than 30 MB, if you [[Getting the development version|get the development version]] you will need at least 2.5 GB as the data repository is about 1.7 GB, you will need to download dependencies as well (up to 60 MB depending on your operating system), and space is needed for build files. You should also check you have enough bandwidth to download these amounts - some ISPs have download limits. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Windows * OS X (10.4 "Tiger" or higher required) * Linux * FreeBSD [[Category:Installation]] ab45852454b6aaf6bb62e2e12148f7a92837056e Installing on Linux 0 44 1226 542 2012-08-27T17:22:18Z Timo 6 3 Redirect to current installing page wikitext text/x-wiki #REDIRECT [[Installing]] aac4a73256b7436383023b3da703be5898c8798d Contribution 0 23 1227 374 2012-09-01T10:08:28Z Timo 6 3 Most content moved to Reporting problems wikitext text/x-wiki #REDIRECT [[Reporting problems]] 5f6aad0007078d2a4305af117690920c7e296292 Main Page 0 1 1228 1182 2012-09-01T10:09:44Z Timo 6 3 Remove Contribution wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General Info|General Info]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes|videomodes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]], [[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modeling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} fbc793dcf43c8697745713d0359eb7248ed81dea 1238 1228 2012-09-01T10:23:25Z Timo 6 3 Fix link wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General|General]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]] *[[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[3D modeling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} 8ecb80be0db09859f037f807cba9f4057ff3faa3 Car files and formats 0 125 1229 2012-09-01T10:14:48Z Timo 6 3 Import from http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Car_files_and_formats (not sure where it went in the old export) wikitext text/x-wiki Files within a car's folder: *CARNAME.car: [[Configfile_format]], list of [[car parameters]]. *about.txt: text format, first line contains the car name, other lines contain additional info. *body.joe: [[JOE format]], car body geometry. *body00.png: PNG format, the body.joe UV texture. Additional body textures and colors can be placed in the folder using names body01.png, body02.png, etc. *brake.png: PNG format, an additive texture using the body.joe UV texture containing brake lights. *collision.joe: [[JOE format]], collision box geometry. Note that as of R2396, this file is no longer required. *engine.wav: WAVE format, engine sound at 7000 RPM. *glass.joe: [[JOE format]], geometry data for any glass elements from the car body (such as windows). *glass.png: PNG format, the glass.joe UV texture. Texture transparency is supported. *interior.joe: [[JOE format]], geometry data for the car's interior. *interior.png: PNG format, the interior.joe UV texture. *oem_wheel.joe: [[JOE format]], geometry data to be used for the wheels. *oem_wheel.png: PNG format, the oem_wheel.joe UV texture. *reverse.png: PNG format, an additive texture using the body.joe UV texture containing reverse lights. 690c9a8d8c651190a0bd38d7b1894ecafcf050ba 1262 1229 2012-09-01T10:54:11Z Timo 6 3 Add category wikitext text/x-wiki Files within a car's folder: *CARNAME.car: [[Configfile_format]], list of [[car parameters]]. *about.txt: text format, first line contains the car name, other lines contain additional info. *body.joe: [[JOE format]], car body geometry. *body00.png: PNG format, the body.joe UV texture. Additional body textures and colors can be placed in the folder using names body01.png, body02.png, etc. *brake.png: PNG format, an additive texture using the body.joe UV texture containing brake lights. *collision.joe: [[JOE format]], collision box geometry. Note that as of R2396, this file is no longer required. *engine.wav: WAVE format, engine sound at 7000 RPM. *glass.joe: [[JOE format]], geometry data for any glass elements from the car body (such as windows). *glass.png: PNG format, the glass.joe UV texture. Texture transparency is supported. *interior.joe: [[JOE format]], geometry data for the car's interior. *interior.png: PNG format, the interior.joe UV texture. *oem_wheel.joe: [[JOE format]], geometry data to be used for the wheels. *oem_wheel.png: PNG format, the oem_wheel.joe UV texture. *reverse.png: PNG format, an additive texture using the body.joe UV texture containing reverse lights. [[Category:Cars]] faa42a47d4383e843671c05169972599a6a94604 Track files and formats 0 126 1230 2012-09-01T10:16:32Z Timo 6 3 Import from http://timothyfurlong.co.uk/vdrift/wiki/index.php?title=Track_files_and_formats (not sure where it went in the old export) wikitext text/x-wiki VDrift's tracks are composed of 3D-modeled objects in .JOE format, PNG graphic files for textures, and text files describing the objects and track. ==Files== The files that define each track are within the '''data/tracks/''trackname''/''' directory, where ''trackname'' is the "short name" of the track. ===about.txt=== Simple text file with the track's full name as the first line. Credits may be on following lines. ===roads.trk=== This file defines the road surface for the track. It is generated by the [[Creating tracks|track editor]]. Following is the format of this file: <number_of_roads> <number_of_Bezier_patches_for_the_1st_road> Control point coordinates of Bezier patch 1 (total 16 points) Control point coordinates of Bezier patch 2 (total 16 points) . . . . <number_of_Bezier_patches_for_the_2nd_road> Control point coordinates of Bezier patch 1 (total 16 points) Control point coordinates of Bezier patch 2 (total 16 points) . . . . <and so on> ===trackshot.png=== This is a 512x512 PNG graphic file that is displayed in the menu when selecting the track to race on. ===track.txt=== This file defines various track parameters. This file is in VDrift's [[Configfile format]]. ===objects/*.png=== The PNG files have names corresponding to the object they belong to. These are the textures for the 3D model objects that make up the track. ===objects/list.txt=== This is a plain text file that defines the relationship between objects and textures, and also sets object properties. It is generated and edited with the [[Listedit tool]] which is part of the [[Track editor]] tools. A description of each field in the list.txt file can be found at the following location: http://svn.vdrift.net/viewvc.cgi/trunk/listedit/format.txt?root=VDrift+Track+Editor&view=co ===objects/objects.jpk=== This file contains all the files that define the 3D models for the objects that make up the track. It is in the [[JOEPack format]], which contains many files in the [[JOE format]]. df426999d9f973610166ffde88a0c29ac1721613 1256 1230 2012-09-01T10:39:14Z Timo 6 3 Add category wikitext text/x-wiki VDrift's tracks are composed of 3D-modeled objects in .JOE format, PNG graphic files for textures, and text files describing the objects and track. ==Files== The files that define each track are within the '''data/tracks/''trackname''/''' directory, where ''trackname'' is the "short name" of the track. ===about.txt=== Simple text file with the track's full name as the first line. Credits may be on following lines. ===roads.trk=== This file defines the road surface for the track. It is generated by the [[Creating tracks|track editor]]. Following is the format of this file: <number_of_roads> <number_of_Bezier_patches_for_the_1st_road> Control point coordinates of Bezier patch 1 (total 16 points) Control point coordinates of Bezier patch 2 (total 16 points) . . . . <number_of_Bezier_patches_for_the_2nd_road> Control point coordinates of Bezier patch 1 (total 16 points) Control point coordinates of Bezier patch 2 (total 16 points) . . . . <and so on> ===trackshot.png=== This is a 512x512 PNG graphic file that is displayed in the menu when selecting the track to race on. ===track.txt=== This file defines various track parameters. This file is in VDrift's [[Configfile format]]. ===objects/*.png=== The PNG files have names corresponding to the object they belong to. These are the textures for the 3D model objects that make up the track. ===objects/list.txt=== This is a plain text file that defines the relationship between objects and textures, and also sets object properties. It is generated and edited with the [[Listedit tool]] which is part of the [[Track editor]] tools. A description of each field in the list.txt file can be found at the following location: http://svn.vdrift.net/viewvc.cgi/trunk/listedit/format.txt?root=VDrift+Track+Editor&view=co ===objects/objects.jpk=== This file contains all the files that define the 3D models for the objects that make up the track. It is in the [[JOEPack format]], which contains many files in the [[JOE format]]. [[Category:Tracks]] b6e398b030e6463ffbc9bdc70f52c2515ba09cdb About the project 0 4 1231 1143 2012-09-01T10:19:00Z Timo 6 3 Change category -> General wikitext text/x-wiki {{update}} ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v3. It is currently available for Linux, FreeBSD, Mac OS X and Windows. ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 45 tracks based on famous real-world tracks * Over 45 cars based on real-world vehicles * Very realistic, simulation-grade driving physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake and reverse lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback * Race against up to 3 AI with variable difficultly * Engine and road sounds ==Goals== The goals of the VDrift project are: * to be a high-quality, open source racing simulation featuring enjoyable and challenging gameplay; * to take advantage of modern computing hardware to accurately simulate vehicle physics in rich and immersive racing environments; and * to provide a platform for creative experimentation to a community of developers and artists. ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. [[Category:General]] 75ef5badeb08891342d29d9321fb4d12f52c1b9c 1232 1231 2012-09-01T10:19:25Z Timo 6 3 Remove update template wikitext text/x-wiki ==Description== VDrift is a cross-platform, open source driving simulation made with drift racing in mind. The driving physics engine was recently re-written from scratch but was inspired and owes much to the Vamos physics engine. It is released under the GNU General Public License (GPL) v3. It is currently available for Linux, FreeBSD, Mac OS X and Windows. ==Features== This game is in the early stages of development but is already very playable. Currently the game features: * Over 45 tracks based on famous real-world tracks * Over 45 cars based on real-world vehicles * Very realistic, simulation-grade driving physics * Mouse/joystick/gamepad/wheel/keyboard support * Fully modeled tracks, scenery and terrain * Several different camera modes * Basic replay system with Skip Forward/Skip Backward * Fully customizable controls * Joystick, mouse and keyboard input filtering * Brake and reverse lights * Driver aids: automatic shifting, traction control, anti-lock braking * Experimental force feedback * Race against up to 3 AI with variable difficultly * Engine and road sounds ==Goals== The goals of the VDrift project are: * to be a high-quality, open source racing simulation featuring enjoyable and challenging gameplay; * to take advantage of modern computing hardware to accurately simulate vehicle physics in rich and immersive racing environments; and * to provide a platform for creative experimentation to a community of developers and artists. ==History== VDrift was created by [http://vdrift.net/users.php?mode=profile&uid=5 Joe Venzon] in early 2005. A fan of Gran Turismo, Joe had a lot of fun trying to drift in GT4, though he was disappointed with GT4's physics after loss of traction. Looking around online, the open source [http://vamos.sf.net/ Vamos Automotive Simulator] performed much better, although the graphics and features were minimal. Building around Vamos, using code adapted from his earlier 3D engine experiments, Joe created the first version of VDrift. So far, every release has been a testing/development quality release. For this and other reasons, dates are used instead of version numbers. For a more detailed history look at the [[Release Changelogs]]. [[Category:General]] 69e71c3b3e8e4715414862c52d3afbe61f1134aa Authors and contributors 0 6 1233 1108 2012-09-01T10:19:48Z Timo 6 3 Change category -> General wikitext text/x-wiki {{note|Many people contribute and deserved to be recognized here, but there is no central method to do that. If you have contributed, please obtain a wiki account and update this page, or post in the forums.}} ==Authors== VDrift was created by [http://vdrift.net/Forum/member.php?action=profile&uid=1 Joe Venzon] who continues to fix bugs in the game, as well as writing new subsystems and maintaining old ones. Joe created everything in VDrift which is not attributed to someone else below. The physics engine in the game was originally [http://vamos.sourceforge.net/ Vamos Automotive Simulator], written by Sam Varner. As time went on it underwent many modifications. Now, the physics system has been rewritten. ==Current Contributors== ===Code=== * [http://vdrift.net/Forum/member.php?action=profile&uid=4879 NaN] has rewritten the physics code, added car color selection, implemented multi-language menus, and continues to fix bugs and add new features. * [http://vdrift.net/users.php?mode=profile&uid=4 Chris Guirl] set up the web sites and the Subversion repositories, and is also to blame for the SCons build scripts, XS model, some miscellaneous graphics, much of the GUI system, bug fixes and reports, documentation, testing, support, and generally annoying Joe. Chris is currently working on a driver training system with evaluation of driving behavior and driver feedback. * [http://vdrift.net/users.php?mode=profile&uid=1435 Francis Whittle] has improved the car suspension by adding new types of suspension. * [http://vdrift.net/users.php?mode=profile&uid=5534 Antonio Caiazzo] is working on a new AI system based on neural networks. ===Game Data=== Most of the imported cars and tracks had several authors to begin with, too many to list here. Thanks to them anyway, and in general to [http://www.racer-xtreme.com/ Racer-Xtreme] and the [http://www.racer.nl/ Racer community] at [http://www.rscnet.org/ Race Sim Central]. ====Tracks==== * [http://vdrift.net/users.php?mode=profile&uid=412 alex25] has imported most of the tracks from various sources, and helped maintain them over time. ====Cars==== * [http://vdrift.net/users.php?mode=profile&uid=1337 Ny Dedes] TC6, LE, and is working on a new car, the ATT. also modeled the driver, and coded the mesh generation for tires and brake rotors. * [http://vdrift.net/users.php?mode=profile&uid=3407 Timothy Porter] is working on preparing freely-licensed car models for import, and polishing the track Rouen. ===Ports=== * [http://vdrift.net/users.php?mode=profile&uid=140 Julian Mayer] maintains the VDrift port for Mac OS X. * [http://vdrift.net/Forum/member.php?action=profile&uid=2097 Timothy Furlong] helps maintain the VDrift port for Mac OS X and has helped to update and expand wiki pages. * [http://vdrift.net/users.php?mode=profile&uid=167 Jose Alonso Cardenas Marquez] maintains the VDrift port for FreeBSD. ==Former Contributors== * [http://vdrift.net/users.php?mode=profile&uid=240 Dick Maurer] imported many cars from Racer and other sources, and created several too. * [http://vdrift.net/users.php?mode=profile&uid=755 rookie1] wrote the automatic shifting code, and the entire artificial intelligence system. He's also fixed a few bugs here and there, and made some improvements to the track editor. * [http://vdrift.net/users.php?mode=profile&uid=5095 MirceaKitsune] contributed new skins for several cars, and several patches including adding reverse lights, sounds for gear, brake and handbrake, and a new car coloring implementation with adapted skins. * [http://vdrift.net/users.php?mode=profile&uid=710 cotharyus] improved the car specifications for many models using research done on the internet, as well as play testing. * [http://vdrift.net/users.php?mode=profile&uid=197 Matthew Nicholson] helped with testing and debugging, worked on Debian GNU/Linux packaging, and improved the build system. * [http://vdrift.net/users.php?mode=profile&uid=364 Szymon Ender] packaged VDrift for Slackware Linux and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=1356 Gonéri Le Bouder] worked on Debian GNU/Linux packaging and helped get VDrift into Arch Linux. * [http://vdrift.net/users.php?mode=profile&uid=32 Nathan Samson] managed the VDrift port for Windows (Cygwin) and helped set up the Autopackage builder for Linux. He also added the first version of internationalization support. * [http://vdrift.net/users.php?mode=profile&uid=158 Alex (Nenillo)] took care of the Windows port for a while before Nathan. * [http://vdrift.net/users.php?mode=profile&uid=769 pwp71] helped maintain track data when new features became available. * [http://vdrift.net/Forum/profile.php?mode=viewprofile&u=1324 Tyler Fric] created the 360. [[Category:General]] 50b090f3f627d15626e0a6e3aed675ee28465a60 License 0 49 1234 1110 2012-09-01T10:20:09Z Timo 6 3 Change category -> General wikitext text/x-wiki VDrift is released under the [http://www.gnu.org/licenses/gpl.html GNU General Public License 3]. ==GPL== GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/> Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. <one line to give the program's name and a brief idea of what it does.> Copyright (C) <year> <name of author> This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>. Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: <program> Copyright (C) <year> <name of author> This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see <http://www.gnu.org/licenses/>. The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read <http://www.gnu.org/philosophy/why-not-lgpl.html>. [[Category:General]] 2be443291d97163cd50403fa3a70150fa50e7af2 Reporting problems 0 75 1235 1111 2012-09-01T10:20:26Z Timo 6 3 Change category -> General wikitext text/x-wiki This page will give you a good idea of how to report problems to the project in a useful way. ==Before reporting== Here are some things you should do before reporting issues to us: * Make sure you've got the latest version of VDrift from the [http://vdrift.net/ VDrift homepage]. * Read the release notes for the version of VDrift you are using, and the platform you are running it on. Be sure to check the Known Issues section. * Make sure you've got the latest drivers installed for your video card. * Find a way to reproduce the problem, if you can. * Search the forums and check the issue tracker for topics already containing your problem. At least read through the most recent posts in the [http://vdrift.net/Forum/forumdisplay.php?fid=5 Help] and [http://vdrift.net/Forum/forumdisplay.php?fid=7 Bugs] forums and the open issues on [https://github.com/VDrift/vdrift/issues GitHub] to make sure this it hasn't already been reported. If it's a big problem, the likelihood is that there's a topic about on the front page of the site. ==Tips for reporting problems== If you've done everything above, and still have a problem, report the issue in the [http://vdrift.net/Forum/forumdisplay.php?fid=5 Help] or [http://vdrift.net/Forum/forumdisplay.php?fid=7 Bugs] forums, following these tips: * Put a meaningful title on your thread. ** "Please help me" or "problem with game" do not tell us anything at all. You need not say that there's a problem, after all you are in the Help forum. ** Here are examples of good topics: "Car won't shift gears", "lap is not triggered", "AI car turns wrong way", "HUD is not drawn". These topics are all short, but tell us what the topic is about before we read it. It is also much easier to search through topics when they have good titles. * Make sure you provide every bit of information you know, even if you think we might not need to know it. This will help us reproduce and fix the problem faster. ** Always include details about your hardware, operating system and library versions. This helps us tell where the problem lies. We can't help or begin to debug a problem until we know where it is. There are many more things that cause problems besides the game code - problems can be caused by hardware (including CPU, memory, video card, sound card, video memory), operating system, drivers (for video and sound, mainly), or the libraries used on your system (this applies mainly to Linux and FreeBSD). ** Give as many details about how to reproduce it as possible. ** If you can, include a screenshot of your problem. * Use your very best English. It's the only language we all understand. The better you write, the easier and quicker it is for us to understand your problem. We understand if you make a few mistakes, but please do your best. ** If you are not a native English speaker, we will do our very best to understand you. ** If you are a native English speaker, we should not have to spend extra time trying to decipher your post, just because you are too lazy to spell correctly and use correct grammar and punctuation. ** These things are sometimes hard to describe. Take your time and write as much as you need to tell us about your problem. * Check back regularly after reporting a problem. We may have questions or possible solutions, as well as tests we may need you to run so we can discover more about how the game runs on your system. Try to respond as quickly as possible, and we'll do the same. ==Examples of reports== Here's a bad example of a bug report: Topic: HELP OH NO!!!!!! when i start up the game it shows some stuff and then goes away what do i do how do u fix it Here's a good example of a bug report: Topic: Crash in latest Windows release Hi, I downloaded the full version of VDrift for Windows (version 2007-03-23) and it crashes whenever I try to start a new game. The menus all function correctly. My system is Windows XP SP2, P4 2 GHz CPU, 1 GB RAM and GeForce 5600 video card with nVidia drivers 9.4.3.2. [[Category:General]] 425d092180508a582806e6497c824ac15829bb62 Useful links 0 84 1236 967 2012-09-01T10:20:45Z Timo 6 3 Change category -> General wikitext text/x-wiki The VDrift community is an always expanding world of open source game developers, gamers on all platforms, artists and designers, and car tuners. It is based totally on the internet. The following links might be useful for users and developers of VDrift. ==VDrift== VDrift has several web sites devoted to the project and development. They are: * [http://vdrift.net/ Home] - The main project web site, includes news and forums, and general project information. * [http://cars.vdrift.net/ Cars] - VDrift cars database. * [http://vdrift.net/Forum/ Forum] - Discuss new features and development, report bugs and get help with problems in the forums. * [http://sourceforge.net/projects/vdrift SourceForge] - VDrift downloads are hosted on SourceForge, as well as the data repository. * [https://github.com/VDrift/vdrift GitHub] - This includes a public browser for the main VDrift Git tree, as well as HTTP access to the tree itself. * [http://wiki.vdrift.net/ Wiki] - The VDrift Wiki is the home of all the project's documentation. * [http://code.google.com/p/vdrift/issues/list Issue Tracker] - Tracks the fixing of bugs and implementing of new features. * [http://vdrift.net/staticpages/index.php?page=irc-chat Chat] - IRC channel used both for developer discussion and user support. If you have a problem or question feel free to stop by and ask. ==Driving Simulation Information== These are some links to general driving simulation information and communities: * Wikipedia: [http://en.wikipedia.org/wiki/Sim_racing Sim racing], [http://en.wikipedia.org/wiki/Racing_video_game Racing video game] - General information about simulated racing games. * [http://www.miata.net/sport/Physics/ Physics of Racing] - A series of articles about the physics of racing cars. * [http://www.cescg.org/CESCG-2003/SDeak/index.html Dynamical Simulation in a Driving Simulator] - A paper that addresses some important aspects of building a graphical model and a dynamical model for a driving simulator. * [http://www.racesimcentral.com/ Race Sim Central] - Racing simulation news and forums. * [http://www.racedepartment.com/content/ RaceDepartment] - Racing simulation community. ==Open Source Driving Simulators and Racing Games== Some more driving simulators: * [http://torcs.org/ The Open Race Car Simulator (TORCS)] - A car racing simulation focusing on AI racing and research. It can also be used as a ordinary car racing game too. * [http://sourceforge.net/projects/trigger-rally/ Trigger Rally] - A fast-paced open source rally racing game. * [http://vamos.sourceforge.net/ Vamos Automotive Simulator] - A automotive simulation framework with an emphasis on thorough physical modeling and good C++ design. It includes a real-time, first-person, 3D driving application. * [http://speed-dreams.sourceforge.net/ Speed Dreams] - A fork of the TORCS, aiming to implement exciting new features, cars, tracks and AI opponents to make a more enjoyable game for the player, as well as constantly improving visual and physics realism. * [http://supertuxkart.sourceforge.net/ Super TuxCart] - A free 3D kart racing game * [http://code.google.com/p/vdrift-ogre/ Stunt Rally] - A racing game that focuses on closed rally tracks with possible stunt elements (jumps, loops, pipes). It uses VDrift for car simulation. [[Category:General]] 7b9a466767959daa8ebea3927b2cd89348e2723f Category:General 14 127 1237 2012-09-01T10:21:39Z Timo 6 3 General information wikitext text/x-wiki These pages contain general information about the VDrift project. 6009750c2b7a54e5debbe4283cdba5b2ffc6af8c Configuring the display 0 21 1239 1179 2012-09-01T10:24:34Z Timo 6 3 Remove update template wikitext text/x-wiki Configuring the display is done by editing [[VDrift.config]] manually, or by changing the settings in the Options -> Display and Options -> Display -> Advanced menus. ==Display Options== ===Resolution=== * type: integer pair * settings: display.width, display.height * values: depends on the file '''vdrift/data/lists/videomodes''' and the resolutions your video card makes available Change the resolution of the game display. See [[Adding video modes]] for how to make new video modes available to choose from. ===Fullscreen=== * type: boolean * setting: display.fullscreen * values: on, off Make the game take up the entire screen. ===Speed Units=== * type: boolean * setting: display.mph * values: on = "MPH", off = "km/h" Change the units that speed is displayed in. ===Framerate Counter=== * type: boolean * setting: display.show_fps * values: on, off Enable/disable the framerate counter. ===Heads Up Display=== * type: boolean * setting: display.show_hud * values: on, off Enable/disable the heads up display. ===Menu Skin=== * type: string * setting: display.skin * values: default "simple", the name of any directory in '''vdrift/data/skins/''' Change the graphics and layout of the VDrift menus. ===Input Graph=== * type: boolean * setting: display.input_graph * values: on, off Visualize the steering and acceleration/braking on screen. ==Advanced Display Options== ===Color Depth=== * type: integer * setting: display.depth * values: 16, 32 Adjust the amount of colors available. ===Texture Size=== * type: string * setting: display.texture_size * values: "small", "medium", "large" Change the size of the textures displayed. ===View Distance=== * type: floating-point * setting: display.view_distance * values: any positive decimal number of meters Change the maximum view distance. ===Anisotropic Filtering=== * type: integer * setting: display.anisotropic * values: depends on your video card Set anisotropic filtering level for textures. ===Antialiasing=== * type: integer * setting: display.antialiasing * values: depends on your video card Set the full scene antialiasing level. ===Car Shadows=== * type: boolean * setting: display.car_shadows * values: on, off Draw simple static shadows beneath the cars. ===Field of View=== * type: floating-point * setting: display.FOV * values: any positive decimal number Field of view angle in the vertical direction. ===Lighting Quality=== * type: integer * setting: display.lighting * values: 0, 1 Set how good the lighting looks during gameplay. 0 is Low, which is totally static lighting. 1 is Medium, static cube-mapped lighting. ===Reflection Quality=== * type: integer * setting: display.reflections * values: 0, 1, 2 Set how good the reflections look during gameplay. 0 is Low, static sphere-mapped reflections. 1 is Medium, static cube-mapped reflections, and 2 is High, dynamic cube-mapped reflections. [[Category:Configuration]] a9d712827c8d26f77448e900636520f518acffe4 Configuring the sound 0 22 1240 365 2012-09-01T10:25:05Z Timo 6 3 Remove update template wikitext text/x-wiki Currently VDrift has 3D sound using OpenAL. In-game sounds include engine RPM sound and tire sounds. The game doesn't have any music yet. ==Sound settings== Configuring the sound is done by editing [[VDrift.config]] manually, or by changing the settings in the Options -> Sounds menu. As there is no game music yet, the only option is the volume of game sounds: [sound] volume = 1 {{note|The following sections refer mostly to the Linux version of VDrift.}} ==Troubleshooting sound== If the engine sound is very broken or choppy sounding, and you hear some noise or crackling, you need to tell OpenAL to try to use a different sound backend. If you don't have an ~/.openalrc file, create it with these contents, or modify your current one to look like this: (define devices '(native alsa sdl arts esd null)) (define alsa-device "dsp0") (define speaker-num 2) ;(define sampling-rate 22050) The important line here is the "define devices" line, OpenAL attempts to use each of those sound output methods in order. It uses the first one that works; in some cases native will work best, in other cases perhaps alsa. If Gnome is running its sound daemon, esd would be the best choice, while KDE usually uses artsd. ==Known bugs== If you don't hear lots of crackling and choppiness, but you still hear a 'click, click, click' sound as the engine sample loops, this is a bug in OpenAL for Linux (or a feature we haven't found a way around...). We've heard there is a fix in the works from the OpenAL project. Also, certain cars have engines that rev very high, and our engine sound system can't pitch shift high enough to play the sound at the correct frequency, after it hits the maximum pitch. This is currently only obvious on the F1 car. ==OpenAL Utility Toolkit== On older versions of OpenAL, ALUT was part of the OpenAL library. At some point not easily markable with a version number, ALUT became a separate library. This changed the way VDrift must be built, as well as some of the sound code. To accomodate users of the old version of OpenAL with ALUT included, there is a switch in the SCons build system used on Linux and FreeBSD. To compile VDrift with "old OpenAL" support, simply add the option to the scons compile command: scons old_openal=1 For more information on the build system see [[Using SCons]]. [[Category:Configuration]] 3c6bae51b15af2207960bcb0bb484c1435b63b26 Configuring the controls 0 20 1241 1178 2012-09-01T10:25:42Z Timo 6 3 Remove update template wikitext text/x-wiki VDrift aims to be very user input friendly, and thus there are many different ways to adjust the controls in the game to fit each user's needs. There are options which affect all the controls, options which affect only a certain type of controls, and options that affect each individual control assignment. ==Features== * Any input method can be used to navigate the menu. * Joysticks can be used by calibrating them in the Options -> Controls -> Joystick -> Calibrate menu. * Any input can be assigned to any control. * Gas, brake, and steering controls only allow a single setting. All other controls can have any number of settings on any types of input devices. ==Control options== Control options are defined in the text configuration file [[options.config]], set in the Options -> Controls menu and its submenus, and stored in the text configuration file [[VDrift.config]]. ===AutoClutch=== * type: boolean * setting: control.autoclutch * values: on, off Enable/disable automatic clutching (prevents car from stalling). Simulates the driver pressing the clutch in using foot when RPM gets close to the stall point. ===AutoShift=== * type: boolean * setting: control.autotrans * values: on, off Enable/disable automatic transmission shifting. ===Button Control Delay=== * type: float * setting: control.button_ramp * values: off (0.0), long (5.0), medium (7.5), short (10.0) Slow down application of button inputs on analog controls. ===Speed Affect on Steering=== * type: float * setting: control.speed_sens_steering * values: range 0.0 to 1.0 The higher the value on this setting, the more steering is limited as car speed increases. ===Joystick Type=== * type: string * setting: joystick.type * values: "joystick", "wheel" Change the type of joystick device. ===Force Feedback Device=== * type: string * setting: joystick.ff_device * values: something like "/dev/input/eventX" Device file for force feedback events. For more detail, see [[Setting up force feedback]]. ===Force Feedback Gain=== * type: float * setting: joystick.ff_gain * values: range 0.5 to 5.0 Multiplier to adjust strength of force feedback. ===Invert Force=== * type: boolean * setting: joystick.ff_invert * values: on, off Reverse the force feedback, if necessary for your wheel. ===200 Degree Wheel=== * type: boolean * setting: joystick.two_hundred * values: on, off Limit steering range to 200 degrees, gives a realistic feel to limited range wheels. ==Assigning controls== Control assignments can be configured through the submenus of the Options -> Controls -> Assign Controls menu, and stored in the text configuration file [[controls]]. Control assignments can be edited after they are set. There are two basic types of control, analog and digital. Analog controls include joystick axes and mouse motion, while digital controls are keys, mouse buttons and joystick buttons. Any type of input can be assigned to any type of control. So, for example, a digital control - like a key - can be assigned to an analog control. If the "Button Control Delay" option is something other than 0.0, then the key will behave just like a true analog control. ===Car Controls=== =====Gas===== * control name: gas The gas control causes the car to speed up. =====Brake===== * control name: brake The brake control causes the car to slow down. =====Steer Left===== * control name: steer_left The steer left control causes the car to turn left. =====Steer Right===== * control name: steer_right The steer right control causes the car to turn right. =====Start Engine===== * control name: start_engine The start engine control will restart the engine if it stalls. {{note|The engine will not start unless the car's transmission is in neutral.}} =====Handbrake===== * control name: handbrake The handbrake brakes only on the back wheels. =====ABS Toggle===== * control name: abs_toggle The ABS Toggle turns anti-lock braking on or off while playing. =====TCS Toggle===== * control name: tcs_toggle The TCS Toggle turns traction control on or off while playing. ====Transmission==== =====Shift Up===== * control name: disengage_shift_up The shift up control changes the car's gear to the next one. =====Shift Down===== * control name: disengage_shift_down The shift down control changes the car's gear to the previous one. =====Engage Clutch===== * control name: engage The engage clutch control lets out the clutch. This must be done after every shift. =====Analog Clutch===== * control name: clutch The analog clutch control can allow you to use an external clutch pedal. ====Gears==== =====Neutral===== * control name: neutral The neutral control shifts the car into neutral. =====1st===== * control name: first_gear The first gear control shifts the car into first gear. =====2nd===== * control name: second_gear The second gear control shifts the car into second gear. =====3rd===== * control name: third_gear The third gear control shifts the car into third gear. =====4th===== * control name: fourth_gear The fourth gear control shifts the car into fourth gear. =====5th===== * control name: fifth_gear The fifth gear control shifts the car into fifth gear. =====6th===== * control name: sixth_gear The sixth gear control shifts the car into sixth gear. =====Reverse===== * control name: reverse The reverse control puts the car into reverse gear. ===Game Controls=== =====Pause===== * control name: pause The pause control freezes the game (except in multiplayer). ====Camera Views==== =====Previous Camera===== * control name: view_prev_camera This moves to the previous camera in the set (hood, in-car, chase rigid, chase loose). =====Next Camera===== * control name: view_next_camera This moves to the next camera in the set (hood, in-car, chase rigid, chase loose). =====Hood===== * control name: view_hood The hood camera control moves the camera to the car's hood. =====In-Car===== * control name: view_incar The in-car camera control moves the camera to driver's view. =====Chase (Rigid)===== * control name: view_chaserigid The rigid chase camera control moves the camera to a fixed distance behind the car. =====Chase (Loose)===== * control name: view_chase The loose chase camera control moves the camera to follow the car like a helicopter. =====Orbit===== * control name: view_orbit The orbit camera control swings around the car [[Configuring the controls#Camera_Movement|as the camera moves]]. =====Free===== * control name: view_free The free camera control can be moved anywhere using the arrow keys. =====Focus Next===== * control name: focus_next_car Changes the camera to focus on the next car. =====Focus Previous===== * control name: focus_prev_car Changes the camera to focus on the previous car. ====Camera Movement==== =====Pan Left===== * control name: pan_left Turn the camera view to the left. =====Pan Right===== * control name: pan_right Turn the camera view to the right. =====Pan Up===== * control name: pan_up Turn the camera view upwards. =====Pan Down===== * control name: pan_down Turn the camera view downwards. =====Zoom In===== * control name: zoom_in Zoom camera in. =====Zoom Out===== * control name: zoom_out Zoom camera out. ====Replays==== =====Skip Forward===== * control name: replay_ff The skip forward control skips ahead ten seconds during a replay. =====Skip Backward===== * control name: replay_rw The skip backward control goes back ten seconds during a replay. ====Tools==== =====Screen Shot===== * control name: screen_shot The screen shot control saves a snapshot of the game while playing. =====Joystick Info===== * control name: joystick_info The joystick info control shows debugging info for available joysticks. ==Editing Controls== After controls have been assigned they can be edited to change some properties of the control. To edit a control just click on it in one of the control assignment menus. ===Analog control properties=== Analog controls include joystick axes and mouse motion. These have options for deadzone, gain and exponent. ====Deadzone==== Deadzone allows motion under a certain threshold percentage to be ignored. This is useful if you use a joystick which "wobbles" around the center. You may see the brake lights come on when you let go of the gas, or the car is hard to keep going straight, deadzone will help to fix these things. ====Gain==== Gain multiplies the input value by a percentage. This will make the input value increase linearly. ====Exponent==== Exponent raises the input value on an exponential curve. This helps give more fine-tuning of controls such as steering around the center but still allows for making sharp turns if needed. ===Digital control properties=== ====Up/Down==== This controls whether the action will be triggered when the button/key is pressed (down), or released (up). ====Held/Once==== This should be set to "held" when they a digital input is mapped to an analog control, like when using keys for gas, brake or steering. This is set automatically when the control is assigned. ==Deleting controls== There is a Delete button on each Control Editing screen, so to delete a control just click on it, then click Delete. [[Category:Configuration]] ff3c7a1179111eae0fb331874d34158e0f71eff7 Logitech G25 support 0 52 1242 1194 2012-09-01T10:26:11Z Timo 6 3 Update categories wikitext text/x-wiki ==Windows== The G25 should be fully supported in Windows without any special steps. ==Linux== When initially plugged in, the G25 will be in compatibility mode, which restricts the steering range and disables the clutch pedal and some of the gears on the H-shifter. VDrift includes two tools that can be used to change G25 modes. Either tool can be used; use whichever tool works the best for you. If you want to use force feedback, you'll need to patch your kernel because when set to native mode, the G25 change its product id, and this product id is not known yet by the kernel ( have a look here [[Enabling force feedback in kernel]]) ===usbtool=== The tool can be found in '''tools/usbtool-0.1.tar.gz'''. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example) as well as the swig package. Run <code>./build.sh</code> and then run <code>./usbtool</code> to see the options available. To set the wheel to native mode and the range to 900 degrees, run: sudo ./usbtool g25-set-range-wheel-900 and sudo ./usbtool g25-set-extended-mode This will likely disconnect the joystick driver. To reconnect it run: sudo rmmod joydev;sudo rmmod usbhid;sudo modprobe usbhid ===G25manage=== The tool can be found in '''tools/G25manage'''. The tool requires libusb development headers to be installed (package libusb-dev on ubuntu intrepid, for example). Run <code>make</code> to compile the tool, then run: sudo ./G25manage --nativemode and sudo ./G25manage --range 900 The wheel should now support the entire turning radius as well as the clutch pedal. ===LTWheelConf=== LTWheelConf is a new tool based on G25manage: https://github.com/TripleSpeeder/LTWheelConf ===Automatically enable native mode=== If your distribution uses udev (such as Ubuntu), you can put this in '''/etc/udev/rules.d/90-g25-wheel.rules''' to automatically run G25manage when the wheel is plugged in: SUBSYSTEM!="usb", GOTO="g25_rules_end" ACTION!="add", GOTO="g25_rules_end" ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c294", RUN+="/usr/local/bin/G25manage --nativemode" #ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --range 900" LABEL="g25_rules_end" # for a joystick detected by the kernel event interface, with a model name "G25_Racing_Wheel change the permissions on the device file # and add a symlink to the event device file KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", SYMLINK+="input/G25event" KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", MODE="0664", GROUP="games" # No deadzone for the wheel on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=0" # No deadzone for the clutch pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=1" # No deadzone for the break pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=2" # No deadzone for the throttle pedal on the G25 in native mode KERNEL=="event[0-9]*", ATTRS{idVendor}=="046d", ATTRS{idProduct}=="c299", RUN+="/usr/local/bin/G25manage --evdev=/dev/input/G25event --deadzone=0 --axis=5" After creating that file and copying the G25manage binary to '''/usr/local/bin''', run <code>/etc/init.d/udev reload</code> (or <code>service udev reload</code> on Ubuntu karmic) and you no longer have to manually run G25manage. [[Category:Configuration]] e6c47615a682d98f7003c488b93804dc2dd54ac4 Setting up force feedback 0 76 1243 1212 2012-09-01T10:26:31Z Timo 6 3 Update categories wikitext text/x-wiki Force feedback is currently only supported on Linux. ==Prerequisites== * a steering wheel supporting constant force effects (like a Logitech Momo Racing force feedback steering wheel) * Linux * HID_FF is enabled in your kernel * your device's USB ID is in '''kernel-source/drivers/usb/input/hid-ff.c''' * the ff-utils test program ffcfstress works for you. Note the device name you use with this program (should be '''/dev/input/eventX'''). * write permission to '''/dev/input/eventX''' * VDrift SVN r1547 or later If you need to recompile your kernel to enable force feedback, you can have a look here [[Enabling force feedback in kernel]] ==Enabling force feedback in VDrift== Once you've met the prerequisites, recompile vdrift like this: scons force_feedback=1 Now open your [[VDrift.config]]. Find the section <code>[ joystick ]</code> and add the following line to the joystick section somewhere: ff_device = /dev/input/event0 Change event0 to whatever device you should use (the one that worked with ffcfstress). Start up VDrift. The console will print whether or not force feedback initialization succeeded. Start a practice game. You should feel a force effect on your steering wheel based on the aligning moment force from the front tires. [[Category:Configuration]] be7b626d4306b4f103fe8921bd3e06f7f78e5fc2 Replays 0 74 1244 881 2012-09-01T10:27:59Z Timo 6 3 Update categories wikitext text/x-wiki Replays are recorded while playing in any game mode, and can be viewed through the "Replays" menu. ==Features== * Skip forward/backward controls (default "," and ".") * Replays can be recorded in any game mode ==Settings== The current number of replays and the selected replay are stored in the file [[VDrift.config]], and are defined in [[options.config]]. Their option names are '''game.num_replays''' and '''game.selected_replay''', respectively. ==Recording== To record a replay, simply set the "Record Session" option on the menu to start the game to "On". Then start the game. During gameplay you will see a message at the bottom of the screen telling you how much recording time is left. The recording system is currently limited to a fixed file size, and stops recording once this size is reached. To stop recording, simply leave the game or quit VDrift altogether. The replay is saved when it is stopped. This means if the game crashes, the replay is not saved. ==Playback== To play back a replay, simply enter the Replays menu from the Main menu. Here you can select the replay by its ID number and play it back by pressing the "Start Replay" button. As new replays are recorded they are added to the available replays in this menu. The new replay's ID number is the one after the last current replay. [[Category:Playing]] 86782647f595e66cbdd490899c0f56c091c2eb27 Drifting techniques 0 30 1245 1180 2012-09-01T10:29:26Z Timo 6 3 Update categories wikitext text/x-wiki Drifting can be a very tedious and difficult feat to achieve. Some consider it an art, while others consider it recklessness. This is just a game, so pick up your paintbrush! ==About drifting== "Drifting refers to a driving technique and to a motorsport where the driver intentionally over steers, causing loss of traction in the rear wheels through turns, while maintaining vehicle control and a high exit speed. A car is drifting when the rear slip angle is greater than the front slip angle prior to the corner apex, and the front wheels are pointing in the opposite direction to the turn (e.g. car is turning left, wheels are pointed right or vice versa), and the driver is controlling these factors." (from [http://en.wikipedia.org/wiki/Drifting_%28motorsport%29 Wikipedia]) Drifting is caused by a lack of traction to the rear tires. The spinning of the tires causes the vehicle's rear end to "swing" out causing oversteer. Different cars will behave differently due to differences in torque, tire tread, weight placement, and suspension recoil. The spinning of the tires also "pushes" the back end of the car forward, so once in oversteer, it will need to be controlled. ==Initiating a drift== There are a number of ways to get yourself into a drift. As said before, weight placement and suspension recoil can affect your traction on the rear tires. Here are some techniques: ===Handbrake=== Probably the easiest thing to do, but, however, most cars in the game do not have strong enough braking to do this. Just activate the handbrake and it will cause your car to lose traction. ===Steer + gas=== Ride your gas at a moderate RPM and steer into the corner. Once your front end starts turning, give it some more gas and you will get into an oversteer. ===Suspension recoil=== Use your suspension to "jump" the car into a drift. Steer away from the corner quickly and steer back in. This will cause a bouncing effect from left to right (or vice versa). Apply the "steer + gas" technique to get into oversteer if not achieved already. ===The dip=== "Dip" your back tires in the dirt or grass or whatever off the track. This will cause your back end to swing a bit. ==Controlling the drift== This is simple to do, but hard to perfect. Essentially, you will only need to steer to get your wheels pointed the direction you want to go. You will also need to control your throttle. The slower your tires spin, the more traction you will have. The opposite happens with faster spinning tires. Control your throttle and be careful not to give it too much juice or you will most likely spin out. Spinning out usually happens when the car is oversteered too much. The tires keep spinning and your car continues to rotate into the turn, but the front end will have too much traction and cause the car to rotate more. ==Cars== Some cars are easier than others to drift in the game. Excessive oversteer can be a problem for beginners. Lots of torque and traction make initiation and recovery easy. *Z06 *GT *G4 [[Category:Playing]] 38aa89188ff1a3d3449bc723fb61ad1848e4b10b Data directory 0 27 1247 444 2012-09-01T10:31:08Z Timo 6 3 Update categories wikitext text/x-wiki VDrift must be able to access its game data to run. This data is stored in the data directory. ==Location== VDrift looks in several places to find its game data at startup. This is the order in which the different locations are checked. # The directory specified in the environment variable '''VDRIFT_DATA_DIRECTORY''' # The subdirectory "data" of the current working directory (the location from which VDrift was run) # A directory named at [[Compiling|compile]]-time via the environment variable '''DATA_DIR''' (usually set by the [[Using SCons|SCons]] build setup) {{note|On Windows, only locations 1 and 2 are checked.}} ==Validation== To ensure that it has the correct location, VDrift checks for the file '''data/settings/[[options.config]]'''. If this file can't be found in any of the above locations, VDrift exits immediately. [[Category:Files]] 782ff43efad093124a0f7899969e2b32d390e7eb Adding video modes 0 5 1248 40 2012-09-01T10:31:44Z Timo 6 3 Update categories wikitext text/x-wiki You can add a new resolution to the list that gets displayed in the in-game display options by editing the '''data/lists/videomodes''' file. When VDrift is run, it reads this file for the base list of video modes. Then it gets a list of available graphics modes that your monitor supports using SDL. During this process it checks the provided modes to see if they are valid (invalid modes are removed from the list). The list of video modes which is then made available through the Display Options menu is all working modes from the videomodes file plus any other modes SDL reported as working. [[Category:Files]] 90899d0a01d62ac65bd94318c7d92e1b825e7b5a Options.config 0 67 1249 840 2012-09-01T10:32:07Z Timo 6 3 Update categories wikitext text/x-wiki VDrift has a set of options which can be added to menus, referenced by the game, and used as a template for a player's settings. These options are defined in '''data/settings/options.config''' in the [[Configfile format]] that VDrift uses for many of its other text files. Once defined, these options can be referred to by the menus to do several things, including: pick default values for options, to get names, descriptions, and lists of values for options, check the type of options, and much more. {{note|The options.config file is '''not''' the place where the user's settings are stored. Users should never need to edit this file. User options are set in [[VDrift.config]].}} The options tell what values are available to the user for a given setting. This may seem confusing. Here's an example definition of an option in the file: [ option-17 ] cat = display name = view_distance title = View Distance desc = Change the maximum view distance. type = float default = 500.0 values = list num_vals = 5 opt00 = Very Low (0.25 km) val00 = 250.0 opt01 = Low (0.5 km) val01 = 500.0 opt02 = Medium (1 km) val02 = 1000.0 opt03 = High (2.5 km) val03 = 2500.0 opt04 = Very High (10 km) val04 = 10000.0 The first line has the option ID number. This must be in the format <code>[ option-## ]</code> and number must be less than num_options. No two widgets should have the same ID. The first field, <code>cat</code>, is just for categorization. This option is in the display category. Next comes the option's name, which combined with the category, makes up the name by which the option is referred to in the menu (here, "display.view_distance"). The <code>title</code> field tells the human-readable name for this option. <code>desc</code> tells a little more about the option, this usually goes in the tip for the option in the menu. <code>type</code> is very important because it tells the game how to interpret the values given to it for each option. This particular option is a floating point option, which means it has a decimal, so it is <code>type</code> float. <code>default</code> is, as you probably guessed, the default value for the option. The <code>values</code> needs a little extra explanation. In this case it is "list" which means that the possible values for the option will be listed along with this option definition. Sometimes <code>values</code> is given an alternate value which tells the game to get the list of values from some other special place. Since this option needs a list of values, we define the list: <code>num_vals</code> tells how many possible options there are; and the following <code>opt-##</code> and <code>val-##</code> fields describe the displayed name for the value, and the actual value, respectively. The <code>opt-##</code> fields are assumed to be strings, but the <code>val-##</code> fields must be of the same type as the type of the object, as must the <code>default</code> setting described earlier. Putting the wrong type of values here can cause very unexpected results. [[Category:Files]] ba6cfa4f6609dba498c433c04876a63dbf52ea97 Sound/graphics formats 0 79 1250 925 2012-09-01T10:32:46Z Timo 6 3 Update categories wikitext text/x-wiki ==Textures== Textures are all in [http://www.libpng.org/pub/png/ Portable Network Graphic (PNG)] format. Graphics can be 24 or 32 bit color, but if you don't need the Alpha channel leave it out. We prefer to produce these graphics using [http://gimp.org/ The GIMP], and many of the originals in the [[Art repository]] are in GIMP's native format (XCF). Other originals are created in [http://inkscape.org/ Inkscape] using its native [http://www.w3.org/TR/SVG/ Scalable Vector Graphics (SVG)] format. ==Models== Models used in the game are all [[JOE format]], which is produced by a Python script for [http://www.blender3d.org/ Blender3D]. Currently models are used for cars (glass, interiors, wheels, etc.) and track objects. Get the modeling tools from the '''tools''' directory of the [[Art repository]]. There are two [[JOE export scripts]], '''export-joe-0.3.py''' and '''export-all-joe-0.3.py'''. ==Sounds== Sounds are in PCM Waveform (WAV) format which can be editing using any waveform audio editor such as [http://audacity.sourceforge.net/ Audacity]. [[Category:Files]] 08d207fe06fbf0f187b43e1ad701eacddcd25f64 JOE format 0 48 1251 1192 2012-09-01T10:33:21Z Timo 6 3 Update categories wikitext text/x-wiki This format is based on the md2 format but with a few enhanced features. It can be written to using a python export script for the Blender 3D modeling package. ==Technical specification== "JOE" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 3 of the file format. {{note|This documentation was generated by reverse engineering model.h and modle.cpp and inspecting the python blender export script. So there may be errors in evaluation.}} === Data Type Map === The following table explicitly defines the various data types used in a JOE file. {| border="1" !Identifier!!Detailed Description |- |int||32-bit signed integer |- |short||16-bit signed integer |- |short3||Three consecutive shorts forming an array |- |float||32-bit floating-point value. Unsure of the exact format... probably whatever is implemented by x86 machines. |- |float3||Three consecutive floats forming an array. |} === File Header === This block of information initiates every file. {| border="1" !data type!!block offset!!name!!description |- |int||0||magic |'''8441211611'''(0x1F722AADB): number used to identify the file as a JOE file. Currently unchecked by vdrift. |- |int||4||version |report the file version that this file conforms to. This specification details version 3 of the format. |- |int||8||num_faces |every frame is expected to contain the same number of faces (polygons) this value specifies how many. This is currently limited to 32000. |- |int||12||num_frames |Presumably, this details the number of frames used in an animation. Currently constrained to "1" |} === Frame Format === details a single configuration of a model. "File Header.num_frames" frames follow the file header. {| border="1" !data type!!block offset!!name!!description |- |int||0||num_verts |the number of vertices used in this frame |- |int||4||num_textcoords |the number of texture coordinates used in this frame. |- |int||8||num_normals |the number of vertex normals used in this frame. |} after each frame header, you will find * File Header.num_faces Face blocks * num_verts Vertex blocks * num_normals Vertex blocks * num_textcoords Texture Coordinate blocks ===Face Format=== Each frame as "File Header.num_faces" face records immediately following the Frame header (decribed above). A face is basically several lists of indices in to vertex, normal, and text coord arrays described in following sections. For this version, a face is always a triangle ( i.e. a three-vertex polygon ). {| border="1" !data type!!block offset!!name!!description |- |short3||0||vertexIndex |Indeces in to the vertex array. These two constructs together define the location of each corner of the face in 3d space. |- |short3||6||normalIndex |Indeces in to the normals array. These two constructs help define how light sources interact with the face at each corner. Normals also help define which side of a face is "front". |- |short3||12||textureIndex |Indeces in to the texture coordinate array. These two constructs together help define which portions of a texture image map to each corner of the face. Note that in the future there may be a multiple of 3 entries in this array to accomidate applying many textures to a single face. Which images are used as textures by a particular model are defined by convention and explained in [[Car files and formats]] and [[Track files and formats]] |} ===Vertex Format=== A vertex block simply contains a three-element float array. Vertex blocks may have a misleading name because they are used for both vertices and normals. {| border="1" !data type!!block offset!!name!!description |- |float3||0||vertex||A three-element float array defining the X, Y, and Z components of a vertex at offsets 0, 4, and 8 respectively |} ===Texture Coordinate Format=== A texture coordinate is a 2-dimensional coordinate used to map prtions of a texture to a model vertex. {| border="1" !data type!!block offset!!name!!description |- |float||0||u||a value between 0 and 1 indicating a position along the width of the texture |- |float||4||v||a value between 0 and 1 indicating a position along the height of the texture. |} [[Category:Files]] 0ec88642c7b7c7a53d4e38f8c5927121a8242bb2 JOEPack format 0 47 1252 1191 2012-09-01T10:33:47Z Timo 6 3 Update categories wikitext text/x-wiki This is a simple file format that just crams a bunch of files together, like a zip file, but without any compression. ==Technical specification== "JoePack" is a binary file format in which multi-byte values are expressed with the little-endian byte order. This section details version 1 of the file format. {{note|This documentation was generated by reverse engineering the source code. So there may be errors in evaluation.}} ===Data Type Map=== The following table explicitly defines the various data types used in a JOE file. {| border="1" !Identifier!!Detailed Description |- |unsigned int||32-bit un-signed integer |- |unsigned short||16-bit un-signed integer |- |string[''x'']||Array of characters with length ''x'' |} ===File Header=== This block of information initiates every file. {| border="1" !Data type!!Block offset!!Name!!Description |- |string[8]||0||versionstr |Report the file version that this file conforms to. This specification details version 1 of the format. |- |unsigned int||8||numobjs |This is the number of files contained in the pack |- |unsigned int||12||maxstrlen |The maximum file name length in this pack |} ===File Allocation Table (FAT)=== The FAT consists of ''numobjs'' entries of the following format: {| border="1" !Data type!!Block offset!!Name!!Description |- |unsigned int||0||offset |Offset into the file at which this file starts. This offset is in bytes from the beginning of the file. |- |unsigned int||4||length |The length of the file this entry corresponds to. |- |string[''maxstrlen'']||8||filename |The name of the file stored at this entry. Note that this is not necessarily null terminated - VDrift stores it in a string of length ''maxstrlen + 1'' and pads it with a null character at the end |} ===File Data=== Following the FAT, the JoePack file simply consists of all the data stored sequentially. Seeking to the offset specified in the FAT (from the beginning of the file) will allow you to read that file's data like normal. [[Category:Files]] e10f15f2048d680a84ac69dd0c09e6ed8e2e1da3 Configfile format 0 19 1253 1177 2012-09-01T10:34:13Z Timo 6 3 Update categories wikitext text/x-wiki Many of VDrift's text-based data and configuration files are written in a format native to the game. The format is designed to be simple and easy to read, while flexibly storing many different kinds of data. It allows settings to be categorized into sections. This format is defined by the ''CONFIG'' class in '''include/config.h''' and '''src/config.cpp'''. ==Features== ===Encoding=== Files in this format are interpreted as plain ASCII text. UTF-8 is not yet supported. ===Include directives=== Lines that start with '''include''' will load sections and settings from another file written in the format. The file may be named using a relative path, which follows the '''include''' keyword and a single space. If the same section exists in both files, a union of the two sections will result in the file which had the include directive. Values from the including file override those in the included file. Circular includes are repressed. ===Comments and Whitespace=== Comments begin with '''#''' and can occur at any point in a line. Everything following the '''#''' is ignored until the end of the line. Whitespace before and after an identifier, name, or value is ignored; however, all spaces are preserved inside both section and setting identifiers. Line breaks are significant -- each line may contain only one section heading, '''include''' directive, or setting. ===Sections=== Sections (categories) are defined by a heading line with an identifier only. The section identifier may be placed between optional '''[''' and ''']''' brackets. Identifiers are case-sensitive. Sections are categorical (flat), not hierarchical (nested). It is possible to create a category hierarchy by carefully naming each section, but the format does not provide any mechanism for managing or traversing a hierarchy. Settings included in a section are all those on lines following the section heading, until the next section heading or the end of the file. ===Settings=== Settings (data items) are defined by a line with the form '''''name'' = ''value''''', where ''name'' is the identifier for the setting and ''value'' is the data for the setting. No restrictions are placed on the type, length, or formatting of the value stored in a setting. Setting identifiers are case-sensitive. Settings before the first section heading have no section. They are referenced by their identifiers preceded by a '''.''' character. ====Value types==== The format employs a somewhat loose typing scheme. Settings do not need to have their types explicitly defined. In the game code, an item can be queried as any type, and depending on the value of the item, certain values can be interpreted differently when requested as different types. Values can be requested as any of the following: * booleans * integer numbers * floating point numbers * strings * lists For instance, the item '''2nd.now''' from the example above would have the value ''1'' if interpreted as an integer. If interpreted as a boolean, its value would be ''true''; as a string, its value would be ''"1"''; as a floating-point number, its value would be ''1.0''. ====Booleans==== The following values will equal ''true'' and ''false'', respectively, when interpreted as boolean values: * '''true''', '''false''' * '''yes''', '''no''' * '''on''', '''off''' * '''1''', '''0''' ====Lists==== List settings may be defined by writing a list of values separated by commas instead of just a single value. ==Example== A file in this format might look like this. name = Example [ first ] stuff = 567 blah = hello radius = 0.555 [ 2nd ] beans = on now = 1 position = 5,6,7 In the file, there are two categories, each with three data items. These items would be referenced by the following identifier strings, respectively: * '''.name''' * '''first.stuff''' * '''first.blah''' * '''first.radius''' * '''2nd.beans''' * '''2nd.now''' * '''2nd.position''' [[Category:Files]] c9759d76af24f47bb3e8654abfbd68877364bbac Menu system 0 54 1254 1195 2012-09-01T10:34:38Z Timo 6 3 Update categories wikitext text/x-wiki The menus are defined by text files in the '''data/skins/''skin_name''/menus/''' directories, where ''skin_name'' is the name of one of the skins [[Skin system]]. The menus are defined in text files in the [[Configfile format]]. Each of the menu "pages" contains a number of menu "widgets", which have a variety of functions. The menu system was designed to be used with any type of controller. Every action may be triggered by a simple button push, except things like text entry. Users should be able to choose if they wish to point and click with the mouse, use the keyboard's arrow keys, or joystick axes and buttons. Keep this in mind when designing or editing menu pages. Other guidelines for menu writing include: * Try to keep the layouts similar to other menus in the skin. * Keep the menus simple and break them up into subgroups where possible. * Put the most used functions closer to the main menu, and the lesser used things in deeper submenus. * Do not put too many widgets on any one page. * Always check to make sure navigating a menus with the keyboard works in the order expected. ==Adding Menus== To add a new menu, simply create a new text file under '''data/skins/''skin_name''/menus/''' with the name of the file the same as the name of the menu in camelcase. ===Writing a Menu=== Now you need to define the new menu. Let's look at the Options menu. The game needs to know a little about the menu itself, so the first few lines of every menu look something like this: name = Options widgets = 5 background = gui/box.png dialog = false The <code>name</code> field should be the same as the filename. The <code>widgets</code> field tells the game how many widgets to load from this menu file (it starts at 0, and stops at <code>widgets - 1</code>). The <code>background</code> field tells the game which graphic to use as the menu background. The <code>dialog</code> tells the game if this is a dialog box or not, but right now this option has no effect (dialog boxes are drawn as full size menus). ===Adding Widgets=== Next, you will need to add some widget definitions to your menu. Here's the format for a label widget, this example taken from the Options menu: [ widget-00 ] type = label name = OptionsLabel text = Options center = 0.5, 0.1 width = auto height = auto fontsize = 9 enabled = 0 selected = 0 default = 0 cancel = 0 The first line is the widget ID. This is the identification number of this widget on this menu page. The number also dictates the order in which the menu will be traversed if you use the arrow keys to move through it. The <code>type</code> field tells VDrift what kind of widget it is. <code>name</code> is a non-numeric identifier. <code>text</code> is the text that will appear on the label. <code>center</code> is the relative position of the widget on the screen. <code>width</code> and <code>height</code> are the relative width and height of the label (here we tell VDrift to figure it out automatically, this is generally a good idea). <code>fontsize</code> is the size to draw the text, the value 9 is pretty big, which is good because this label is the menu title. The next values, <code>enabled</code>, <code>selected</code>, <code>default</code>, and <code>cancel</code>, are boolean values. These are available in every widget and tell how the user can interact with it. <code>enabled</code> allows the user to use the widget. A label has no function so in this case it is turned off. <code>selected</code> indicates if this item should be the one selected when the menu is displayed for the first time. Since a user can't use a label, it shouldn't be selected, so this is off too. <code>default</code> is usually used for OK buttons, or buttons that need to trigger saving all the values on the page when they're pressed. <code>cancel</code> is for Cancel buttons and indicates if this is the button to be pressed when Escape is pressed on this menu, and discards any changes made on the menu. ===Making the Menus Accessible from Other Menus=== Navigation through the menu system is done using buttons. Let's say for example you are creating a menu called GameOptions which will allow users to change certain aspects of the gameplay (perhaps such as difficulty level). This menu would be accessed from the existing Options menu. So you'll need to add a button for GameOptions to the Options menu. Here's an example button widget that could do this. [ widget-01 ] type = button name = GameOptionsButton text = Game tip = Change game settings. action = GameOptions center = 0.5, 0.3 color = 0.0, 0.0, 0.8 width = auto height = auto fontsize = 7 enabled = 1 selected = 1 default = 0 cancel = 0 The first thing you notice is all the properties it shares with the label widget. In this case let's say the button is now the first one on the Options menu. The <code>type</code> is now "button" appropriately. Some new options available to a button are: <code>tip</code>, which shows a description of the widget at the bottom of the screen; <code>action</code>, which dictates what happens when the button is pressed (in this case the name of the menu to go to, in other cases, a special function name that tells the game to do something); and finally <code>color</code>, which allows you to change the color of the text in %R, %G, %B format. This particular button has 80% blue text. Take a look at some of the existing menu entries for more examples. ==Warning== The menu system is still a little light on the error checking. Therefore care must be taken when writing menus or editing them that you don't miss something, or the menu may not work at all, may be unreachable or inescapable, or may even cause the game to crash. [[Category:Files]] 0505cc40946e310b9b65701783342d17d139349e Getting tracks 0 109 1255 1156 2012-09-01T10:37:48Z Timo 6 3 Formatting style updates wikitext text/x-wiki A small selection of tracks are distributed in the release VDrift packages. This page describes how to get some more. ==List of tracks== The following cars are in the [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/a1ring/ A1 Ring] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/bahrain/ Bahrain] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/barcelona/ Barcelona] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/brands/ Brands Hatch] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/charade70/ Charade 1970] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/detroit/ Detroit] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dijon/ Dijon-Prenois] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/dirt-3/ Australian Countryside] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/estoril88/ Estoril 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/fuji/ Fuji] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hockenheim/ Hockenheim] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/hungaroring06/ Hungaroring 2006] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/imola2005/ Imola 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/indianhill/ Indian Hill] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/interlagos/ Interlagos] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jarama/ Jarama] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/jerez88/ Jerez 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/kyalami/ Kyalami] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/laconca/ La Conca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lagunaseca/ Laguna Seca] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/lemans/ Le Mans] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/magny/ Magny] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/melbourne/ Melbourne] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco/ Monaco] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monaco88/ Monaco 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/montreal/ Montreal] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza/ Monza] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/monza88/ Monza 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/mosport/ Mosport] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/nuerburgring_nordschleife/ Nürburgring Nordschleife] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Parking Lot] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/parkinglot/ Pau] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/paulricard88/ Paul Ricard 1988] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ring2007/ Nürburgring Nordschleife 2007] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/road_atlanta/ Road Atlanta] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/rouen/ Rouen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/ruudskogen/ Ruudskogen] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/sepang/ Sepang] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/singapore/ Singapore] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa/ Spa-Francorchamps] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/spa2008/ Spa-Francorchamps 2008] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/suzuka2005/ Suzuka 2005] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/vir/ Virgina International] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/wackersdorf/ Wackersdorf] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/weekend/ Weekend Drive] * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/tracks/zandvoort/ Zandvoort] </div> ==Downloading== Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. ==Installing== Uncompress the .tar.gz file. This should create a folder with the name of the track containing files like '''about.txt''' and '''roads.trk'''. Move that folder to '''vdrift/data/tracks''' folder. Run VDrift and your new track will be ready for racing! ==Updating== You can update tracks from within VDrift itself. Go to Updates -> Check for updates. If any are available go Back -> Manage Tracks, select the track to update and click "Download". ==See also== * [[Getting cars]] [[Category:Tracks]] 7f5605026c57943269031047fb2bfc8e6d9b6047 Creating tracks 0 26 1257 442 2012-09-01T10:40:26Z Timo 6 3 Update categories wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * VDrift * VDrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: https://github.com/VDrift/blender-scripts Get the "export-all-joe-0.3.py" script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: git clone https://github.com/VDrift/trackeditor vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See the [[track modeling tutorial]] for help with this step. * If you use a 3d editor other than blender, import the track into blender. * Use the export-all-joe-0.3.py blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of .joe files and a list.txt file. The list.txt file may be named somename-list.txt, in which case you should rename it to list.txt. At least one .joe file should get created for the curve track. Also verify that list.txt is mentioning all the .joe files. An empty list.txt will not load anything in the editor. * Create new folder for track in track editor folder TRACKEDITOR_TP (if your track is called parkinglot, the path could be /home/joe/VDrift-trackeditor/data/tracks/parkinglot). * Make folder TRACKEDITOR_TP/objects/ * Copy all of the .joe files and the list.txt file to TRACKEDITOR_TP/objects/ * Open track editor data/tracks/editor.config and set active track to TRACKEDITOR_TP. * Create a TRACKEDITOR_TP/track.txt file with at least a line "cull faces = on". track.txt is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * CD to the VDrift-trackeditor/joepack folder. Compile the joepack tool by running scons * CD to the TRACKEDITOR_TP/objects folder (this is important, the packfile stores relative paths) and run /path/to/VDrift-trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy TRACKEDITOR_TP into the main VDrift tracks folder VDRIFT_TP (for example /home/joe/VDrift/data/tracks/parkinglot). Erase VDRIFT_TP/objects/*.joe since they are all in the pack file now. * Add VDRIFT_TP/about.txt and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to VDRIFT_TP/trackshot.png * Open up all of the texture files in TRACKEDITOR_TP/objects and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the VDrift-tracked/listedit tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within vdrift game. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in track.txt if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] c6c5084afede83e815813749567ebb82e914abe4 1258 1257 2012-09-01T10:48:30Z Timo 6 3 Formatting style updates wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * VDrift * VDrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: https://github.com/VDrift/blender-scripts Get the '''export-all-joe-0.3.py''' script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: git clone https://github.com/VDrift/trackeditor vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See [[3D modeling]] for resources to help with this step. * If you use a 3D editor other than blender, import the track into blender. * Use the '''export-all-joe-0.3.py''' blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of '''.joe''' files and a '''list.txt''' file. The '''list.txt''' file may be named '''somename-list.txt''', in which case you should rename it to '''list.txt'''. At least one '''.joe''' file should get created for the curve track. Also verify that '''list.txt''' is mentioning all the '''.joe''' files. An empty '''list.txt''' will not load anything in the editor. * Create new folder for track in track editor folder ''TRACKEDITOR_TP'' (if your track is called parkinglot, the path could be '''/home/joe/trackeditor/data/tracks/parkinglot'''). * Make folder '''''TRACKEDITOR_TP''/objects/''' * Copy all of the '''.joe''' files and the '''list.txt''' file to '''''TRACKEDITOR_TP''/objects/''' * Open track editor '''data/tracks/editor.config''' and set active track to ''TRACKEDITOR_TP''. * Create a '''''TRACKEDITOR_TP''/track.txt'' file with at least a line "cull faces = on". '''track.txt''' is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * <code>cd</code> to the '''trackeditor/joepack''' folder. Compile the joepack tool by running scons * <code>cd</code> to the '''''TRACKEDITOR_TP''/objects''' folder (this is important, the packfile stores relative paths) and run /path/to/trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy ''TRACKEDITOR_TP'' into the main VDrift tracks folder ''VDRIFT_TP'' (for example '''/home/joe/vdrift/data/tracks/parkinglot'''). Erase '''''VDRIFT_TP''/objects/*.joe''' since they are all in the pack file now. * Add '''''VDRIFT_TP''/about.txt''' and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to '''''VDRIFT_TP''/trackshot.png''' * Open up all of the texture files in '''''TRACKEDITOR_TP''/objects''' and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the '''trackeditor/listedit''' tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within VDrift. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in '''track.txt''' if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] cdab443976c847e8c20a620c2278b42eac84b0c3 Importing Racer tracks 0 41 1259 1190 2012-09-01T10:48:59Z Timo 6 3 Update categories wikitext text/x-wiki ==Directions for importing Racer tracks== {{note|These instructions are meant for Linux}} * Unzip and put racer files in temporary folder ''RACER_TP'' (temporary track path). Make sure the path has no spaces (dof2joe doesn't like spaces). * Create new folder for track in track editor folder ''TRACKEDITOR_TP''. * Convert all texture names to lowercase in ''RACER_TP'' via find . -type f -name \*.tga|sort -r|awk '{f=tolower($1); if(f!=$1 && p[f]!=1){print "mv "$1" "f}p[$1]=1}' | /bin/sh * Make folder '''''TRACKEDITOR_TP''/objects/''' * Run the following command: dof2joe/dof2joe -p TRACKEDITOR_TP/objects/ RACER_TP/*.dof If there are thousands of .dof files, you may have to do this in steps to avoid a "too many arguments" error from your shell. This will take a while. Textures are automatically converted using nconvert. No filenames should have spaces. * Open track editor '''data/tracks/editor.config''' and set active track to ''TRACKEDITOR_TP''. * Run the track editor. Trace the roadways and mark the starting position (press H for help). * cd to the '''''TRACKEDITOR_TP''/objects''' folder (this is important, the packfile stores relative paths) and run joepack/joepack -c objects.jpk *.joe * Copy ''TRACKEDITOR_TP'' into the main VDrift tracks folder ''VDRIFT_TP''. Erase '''''VDRIFT_TP''/objects/*.joe''' (since they are in the pack file). * Add '''''VDRIFT_TP''/about.txt''' and ensure that the first line is the name of the track. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Add the track selection screenshot to '''''VDRIFT_TP''/trackshot.png''' (hopefully these png files will be moved into the folders of the individual tracks soon). * Open up all of the texture files in '''''TRACKEDITOR_TP''/objects''' and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects should not be mipmapped), or be skyboxes. * Any textures that have transparent areas are usually colored #FF00FF in the Racer textures. You'll need to make these truly transparent in the PNG files. An easy way to do this is to use ImageMagick. Use the commands mogrify -transparent rgb\(255,0,255\) *.png mogrify -fill rgb\(128,128,128\) -opaque rgba\(255,0,255,0\) *.png This can be scripted to speed things up of course. * Set the correct object properties using the '''trackeditor/listedit''' [[Listedit tool]]. * Done! [[Category:Tracks]] 24b7e5569a786236e2ef515e4c1f50215f4b192f Car parameters for vdrift-2009-06-15 and older 0 11 1260 171 2012-09-01T10:50:37Z Timo 6 3 Update categories wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. [[Category:Cars]] f666a86ce7b3507bc83eb1dc99b6c73edfaa9afa Getting cars 0 108 1261 1155 2012-09-01T10:53:42Z Timo 6 3 Formatting style updates wikitext text/x-wiki <small>[[Getting cars|English]] - [[Getting cars/it|Italiano]]</small> A small selection of cars are distributed in the release VDrift packages. This page describes how to get some more. ==List of cars== The following cars are in the [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data data repository] of VDrift. To see pictures of some of the cars visit the [http://cars.vdrift.net cars.vdrift.net] website. <div style="column-count:3;-moz-column-count:3;-webkit-column-count:3"> * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/350Z/ 350Z]: Nissan 350Z * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/360/ 360]: Ferrari 360 Modena * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/3S/ 3S]: Mazda 3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/ATT/ ATT]: Audi TT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/AX2/ AX2]: Fictional Concept Car * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/C7/ C7]: Lotus Super Seven * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CO/ CO]: AC Shelby Cobra * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CS/ CS]: Porsche 911 Clubsport * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/CT/ CT]: Porsche Carrera Turbo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/DCH/ DCH]: Dodge Challenger (1970) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/DSN/ DSN]: Dacia Supernova * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/EF/ EF]: Ferrari Enzo * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F1-02/ F1-02]: F1 car (2002) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/F40/ F40]: Ferrari F40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FE/ FE]: Ford Escort MKII Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/FF/ FF]: Formula Ford * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G-P34/ G-P34]: Tyrrell P34 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/G4/ G4]: Ford GT40 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GT/ GT]: Ford Mustang GT * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTR/ GTR]: Ford Mustang GT (non-drift version) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/GTV6/ GTV6]: Alfa Romeo GTV6 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1-91/ KF1-91]: KF1 1991 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1K/ KF1K]: KF1 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/KF1T/ KF1T]: KF1 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LE/ LE]: Lotus Elise * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/LGN/ LNG]: Dacia Logan * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3/ M3]: BMW E30 M3 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M3D/ M3D]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M7/ M7]: Mazda RX-7 FC * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/M8/ M8]: Mazda RX-8 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MC/ MC]: Mini Cooper (new style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/MI/ MI]: Mini Cooper (old style) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/NS/ NS]: Nissan Skyline R32 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RG/ RG]: Renault 12 Gordini * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/RS2/ RS2]: Subaru Imprezza RS 2.5 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SB/ SB]: Sand buggy * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/SV/ SV]: Lamborghini Miura SV * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/T73/ T73]: Lotus 43 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC/ TC]: Toyota Celica ST185 Rally * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TC6/ TC6]: Toyota Celica (6th generation) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL/ TL]: Toyota Levin * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TL2/ TL2]: Toyota Levin (model version 2) * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/TRA/ TRA]: Trabant 601 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XG/ XG]: BMW 330cxi * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XM/ XM]: BMW M3 SPEED World Challenge * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/XS/ XS]: Honda S2000 * [http://vdrift.svn.sourceforge.net/viewvc/vdrift/vdrift-data/cars/Z06/ Z06]: Chevrolet C5 Corvette Z06 </div> ==Downloading== Click the links in the list above then click the "Download GNU Tarball" link near the bottom of the page. ==Installing== Uncompress the .tar.gz file. This should create a folder with the short name of the car containing files like '''about.txt''' and '''body.joe'''. Move that folder to '''vdrift/data/cars''' folder. Run VDrift and your new car will be ready to drive! ==Updating== You can update cars from within VDrift itself. Go to Updates -> Check for updates. If any are available go Back -> Manage Cars, select the car to update and click "Download". ==See also== * [[Getting tracks]] [[Category:Cars]] e347cd765022316fa253f7152abfdbe6f3257a6d Creating cars 0 25 1263 419 2012-09-01T10:54:38Z Timo 6 3 Update categories wikitext text/x-wiki This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] 44d5a2cf66e8681760d8f02396bee5e4f83a8e04 Car parameters 0 9 1264 127 2012-09-01T10:55:02Z Timo 6 3 Update categories wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake rotor model is generated. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] fa7eb85116934ead00c0e6dbde1c5e37829c21a4 3D modeling 0 3 1265 1152 2012-09-01T10:55:25Z Timo 6 3 Update categories wikitext text/x-wiki ==Blender== [http://blender.org/ Blender] is the best 3D modeling application to use for creating cars, tracks, and related 3D game art for VDrift. ===General Use=== * [http://wiki.blender.org/ Blender Wiki] - All the official Blender documentation, including the [http://wiki.blender.org/index.php/Doc:Manual User's Manual]. * [http://blenderunderground.com/video-tutorials/ BlenderUnderground Blender Video Tutorials] - The Blender Basics series seeks to provide a way for those new to Blender, or those new to 3D graphics in general, to begin to master this powerful and capable application. * [http://www.blenderart.org/issues/ BlenderArt Magazine] - A magazine dedicated to Blender. ===Modeling Cars=== * [http://www.blendernation.com/2006/04/15/tutorial-modeling-a-toyota-celica/ BlenderNation Tutorial: Modeling a Toyota Celica] - If you want to learn how to model a car from reference pictures, then check out this tutorial. It covers techniques such as loading bitmaps in the 3D viewports, tracing them, mesh extrusion, normal correction and using subdivision surfaces. Aimed at intermediate level Blender users. * [http://issuu.com/blenderart_magazine/docs/blenderart_mag-8_eng BlenderArt Magazine, Issue 8: Car Modeling] - An entire magazine issue about modeling cars. ===Modeling Tracks=== * [http://supertuxkart.sourceforge.net/Blender_track_modelling_tutorial Super TuxKart Track Modeling Tutorial] - A little guide on how to build tracks with Blender and how to avoid common pitfalls. Some basic Blender knowledge is assumed. [[Category:Cars]] [[Category:Tracks]] 2d5f41c6965bf4b567aaa74a24d44c49862920b1 Testing 0 81 1266 1214 2012-09-01T10:56:48Z Timo 6 3 Update categories wikitext text/x-wiki VDrift includes a very simple unit testing framework for C++ code. It is derived from [http://quicktest.sourceforge.net/ QuickTest]. ==Running the Tests== To run unit tests, the test executable must first be built. ===Building=== In the VDrift source root, run: scons test ===Executing=== The executable is called '''vdrift-test''' and is compiled to the '''build/''' directory in the root of the VDrift source tree. To run it, simply do: build/vdrift-test ===Results=== The results are written to STDOUT. An example: [-------------- RUNNING UNIT TESTS --------------] src/matrix4.cpp(26): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0) src/matrix4.cpp(27): 'matrix4_test' FAILED: value1 (10) should be close to value2 (20) src/matrix4.cpp(28): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (-1) src/matrix4.cpp(33): 'matrix4_test' FAILED: value1 (1) should be close to value2 (0) src/matrix4.cpp(34): 'matrix4_test' FAILED: value1 (10) should be close to value2 (0) src/matrix4.cpp(35): 'matrix4_test' FAILED: value1 (-1.19209e-07) should be close to value2 (1) Results: 29 succeeded, 1 failed [-------------- UNIT TESTS FINISHED -------------] ==Writing New Tests== Consult the [http://quicktest.sourceforge.net/usage.html QuickTest How to Use It] and the [http://quicktest.sourceforge.net/api.html QuickTest API Reference] for details on how to write unit tests using QuickTest. ===Example Tests=== To look at some example test code already in VDrift, look at '''src/*.cpp''' files which contain the macro <code>QT_TEST</code>. [[Category:Development]] ae19919c5e0e269d13d2b3538883ee19c7db6a31 Debugging 0 28 1267 448 2012-09-01T10:57:21Z Timo 6 3 Update categories wikitext text/x-wiki Debugging VDrift can help provide the developers with more information on problems, so they can be more effectively fixed. This article hopes to explain how to do this. ==General== VDrift outputs most of its debugging info on to the console via "cout" statements. There are some logs kept in ~/.vdrift/logs/ but they are not used much. To get more output on the console, users can simply use the '''-verbose''' option when running the game: vdrift -verbose This will drastically increase the amount of debugging output. This may reduce game performance but makes it easier to get an idea of where problems are occurring. {{note|On Windows, the game is not usually run in a console so the debugging output can't be seen.}} ==Linux== If the game crashes it is easiest to get information about the crash from GDB, the GNU Debugger. ===GDB=== On Linux debugging can be done using '''gdb'''. First, VDrift must be compiled with debugging symbols. To turn on debugging symbols simply use the '''release=0''' option when running SCons: scons release=0 {{note|VDrift binary releases are stripped of debugging symbols to decrease the size of the binary. These will not produce any useful information if run with GDB.}} Now the binary (which is in the build/ directory if it is not installed) can be analyzed with GDB. Make sure you have the program '''gdb''' installed on your system, then run GDB on the vdrift binary (change "build/vdrift" to just "vdrift" if you ran '''scons install'''): gdb build/vdrift This will put you on the gdb shell where you can then run the game. Here you can also specify any command line arguments to pass to the game. '''-verbose''' is added here as an example, but no options are necessary for debugging. (gdb) run -verbose Now the game will run. You may notice that when running in GDB game performance is less than normal. This is a natural side effect of GDB and nothing to worry about. ====Obtaining a backtrace==== If the game crashes (commonly resulting in a "Segmentation Fault" error) while running in GDB it is possible to obtain a ''backtrace'' of the crash. This is basically the stack of function calls that happened to trigger the crash. To obtain a backtrace within GDB, wait for the game to crash, and then when returned to the GDB prompt, enter the '''backtrace''' command: (gdb) backtrace The output of this command can be posted on the VDrift forums for the developers to see. Please follow up on your post, as we may have other questions for you or may need you to perform other tests to properly identify the problem. [[Category:Development]] 4c32687b85630740e99209796d9d0df6a1e3daee Coding guidelines 0 13 1268 1174 2012-09-01T10:57:42Z Timo 6 3 Update categories wikitext text/x-wiki ==File extensions== Header files have .h extensions. Source implementation files have .cpp extensions. ==Code== VDrift code is formatted using all tabs and no spaces. The following example demonstrates VDrift's coding style. class EXAMPLECLASS { private: int data; public: EXAMPLECLASS(); ~EXAMPLECLASS(); void MemberFunction(); }; // Add the sum of the number 1 - 10 to data. void EXAMPLECLASS::MemberFunction() { // loop and add i to data <-- Useless comment, should be avoided. for (int i = 1; i <= 10; i++) { data += i; } } ==Indentation and Naming== Notice the use of ALL CAPS for class names. Function names should be presented in MixedCase?. Opening and closing curly brackets ({}) should be on their own line, and should not be indented. The enclosed statements however, should be indented. Control statements should have one space between the statement and the left paren. There should be no padding inside of the parens unless it helps readability, use your judgement. Function calls should have no spaces between the function name and the left paren. ==Commenting== Do not overuse comments. Only comment code which has side effects, is not clear at first glance, or includes complex operations. It is OK to comment a section of code with a description of what that section does. It is a good idea to comment most non-trivial classes, methods, and instance variables. When commenting code, keep in mind that using [http://doxygen.org/ Doxygen] style comments will help to generate better documenation. See [[Source code documentation]] for more information. ==Inheritance== Inheritance is generally discouraged ''except'' in simple cases where the base class is abstract and there is only one level of inheritance. In general, excessive use of inheritance compromises code readability and could be easily fixed by using a member variable instead of inheritance. For example, instead of making CAR inherit from ENGINE, the CAR should contain an ENGINE member. ==Coupling/Dependency== Coupling (or dependency) is the degree to which each program module relies on each one of the other modules. Coupling should be eliminated between unrelated modules. De-coupling modules leads to greater code cohesion, and high cohesion is associated with several desirable traits of software including robustness, reliability, reusability, and understandability whereas low cohesion is associated with undesirable traits such as being difficult to maintain, difficult to test, difficult to reuse, and even difficult to understand. Program module (class) dependencies should be structured in a tree form, where higher level modules know about lower level modules, but lower level modules don't know about each other. For example, if there is a GAME module that contains a RENDERER module and a SETTINGS module, the code inside the GAME module should query the SETTINGS module and then initialize the RENDERER appropriately. That is, the GAME module would tell the SETTINGS module to go read the configuration file, ask the SETTINGS class "what's the display resolution supposed to be? how many bits per pixel? etc", and then make its calls to the RENDERER saying "okay, set up a display with this resolution, this many bits per pixel, etc". The RENDERER should ''not'' know anything about the SETTINGS module and should not access it. The advantage is that now the RENDERER doesn't need to know anything about a SETTINGS subsystem (and vice versa). If the SETTINGS subsystem is later rewritten, it doesn't (and shouldn't ever) cause any changes to code in the RENDERER. The RENDERER is now decoupled from the SETTINGS subsystem, and can now be re-used in a different project with a completely different SETTINGS subsystem. Decoupling also makes thread-safe coding easy. Globals and singletons cause excessive coupling due to their global-access properties and should be completely avoided. ==Namespaces== Classes are declared in the global namespace, but can also be put in custom namespaces if appropriate. No include file should pollute the global namespace with a "using" directive. That is, lines such as "using namespace std" should not occur in any header (.h) file. All "using" directives should be put into the implementation source files (.cpp). This is because any source file that includes a header with a using directive will have its global namespace unexpectedly polluted in whatever way the header file specifies. For "using" directives in .cpp files, specific "using" declarations are preferred to "using namespace" declarations. That is, prefer "using std::string", "using std::endl", etc to "using namespace std". This is for readability. ==Testing== Unit testing is encouraged. VDrift comes with the [http://quicktest.sourceforge.net QuickTest] unit testing framework. To use, simply #include "unittest.h" in your source code implementation files. {{note|Currently, not all of VDrift's code follows these guidelines, do not waste time cleaning up the code, unless you are re-writing that particular piece of it. There will be a time when the code will be cleaned up. Also code from the Vamos project, does not follow these guidelines either. Make sure all new code written for VDrift follows these guidelines.}} [[Category:Development]] 49d2037464e2ef0b77a42dbe6c4d2b1aa816f5d1 Source code documentation 0 80 1269 1135 2012-09-01T10:58:04Z Timo 6 3 Update categories wikitext text/x-wiki Doxygen documentation is available for VDrift. Currently only the Subversion trunk is available. It is generated daily from the latest version of the [[Getting the development version|Development version]]. == Other versions == Doxygen output for the last release will be added soon. When new releases are made, documentation will be made available with the release. == Read Online == You can find [http://vdrift.net/doxygen/trunk/ Doxygen for VDrift trunk] at the following URL: http://vdrift.net/doxygen/trunk/ == Download == Downloadable PDF and Zip archives of the HTML version for offline browsing will be available soon. == Help improve documentation == If you are writing new code for VDrift, it would help to write comments using a format Doxygen can take advantage of. Here are a few handy links describing how to do that: * [http://www.stack.nl/~dimitri/doxygen/docblocks.html Doxygen Manual: Documenting Code] * [http://www.stack.nl/~dimitri/doxygen/commands.html Doxygen Manual: Command Reference] * [http://www.stack.nl/~dimitri/doxygen/manual.html Entire Doxygen Manual] [[Category:Development]] a429e9812f8a7d58d8ba0b66843d41122a93ccc3 Old Numerical Integration 0 66 1270 1206 2012-09-01T10:59:01Z Timo 6 3 Update categories wikitext text/x-wiki Numerical integration constitutes a broad family of algorithms for calculating the numerical value of a definite integral. This the backbone of physics simulations because it allows calculation of velocity and position from forces (and therefore acceleration) applied to a rigid body. ==Criteria== In realtime simulations, the most important integrator criteria are performance, stability, and accuracy. Performance refers to how long it takes to perform the integration for a given timestep. Stability refers to how well the integrator copes with stiff constraints such as high spring constants before errors becomes unacceptably large. Accuracy refers to how well the integrator matches the expected result, and includes whether or not the integrator damps out (loses energy) over time. ==Euler Integration== The Euler method is a first order numerical procedure for solving ordinary differential equations (ODEs) with a given initial value. It is the most basic kind of explicit method for numerical integration for ordinary differential equations. The performance is excellent, but both stability and accuracy are poor. Because it is so simple, it unfortunately gets used very often. Vamos uses Euler integration. a = acceleration(state, t+dt) x += v*dt v += a*dt ==Newton-Stormer-Verlet (NSV) / Symplectic Euler / Euler–Cromer algorithm== The Euler–Cromer algorithm or symplectic Euler method or Newton-Stormer-Verlet (NSV) method is a modification of the Euler method for solving Hamilton's equations, a system of ordinary differential equations that arises in classical mechanics. It is a symplectic integrator, which is a class of geometric integrators that is especially good at simulations of dynamics and hence it yields much better results than the standard Euler method. The performance is excellent, and stability is fair, and accuracy is excellent. Unbelievably, the algorithm is very simple and almost identical to the Euler method. a = acceleration(state, t+dt) v += a*dt x += v*dt ==Velocity Verlet== Verlet integration is a numerical integration method originally designed for calculating the trajectories of particles in molecular dynamics simulations. The velocity verlet variant directly calculates velocity. The performance is fair, and both stability and accuracy are excellent. Unfortunately, calculating the velocity depends on knowing the acceleration for the current iteration, which poses a problem when the acceleration depends on the velocity (such as with a damper). Using the velocity from the last iteration to calculate the acceleration gets around this but may have implications on the accuracy of the method. if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt a = acceleration(state, t+dt) v += 0.5*(a + oldaccel)*dt oldaccel = a ==Runge Kutta 4== The Runge–Kutta methods are an important family of implicit and explicit iterative methods for the approximation of solutions of ordinary differential equations. The Runge Kutta 4 (or RK4) is a well-known 4th-order explicit Runge Kutta algorithm. The code snippet shown below is high level, and the actual implementation is a bit more complicated. Performance is poor, since the acceleration must be evaluated for all objects 4 times per iteration, stability is excellent, and accuracy is fair. Derivative a = evaluate(state, t) Derivative b = evaluate(state, t, dt*0.5f, a) Derivative c = evaluate(state, t, dt*0.5f, b) Derivative d = evaluate(state, t, dt, c) const float dxdt = 1.0f/6.0f * (a.dx + 2.0f*(b.dx + c.dx) + d.dx) const float dvdt = 1.0f/6.0f * (a.dv + 2.0f*(b.dv + c.dv) + d.dv) state.x = state.x + dxdt*dt state.v = state.v + dvdt*dt ==Detailed Comparison: oscillating spring-mass== For comparing these algorithms I used a simple spring-mass oscillator, because it can be difficult to integrate when the spring is very stiff, but it can be analytically solved easily so I have something to compare the integrators to. In addition, its force calculation depends only on position, which allows the Velocity Verlet algorithm to work as it is commonly used. For this simulation the instantaneous acceleration input into all integrators is calculated as: a = -k*x/m; where k is the spring constant, x is the position, and m is the mass. The analytic solution is calculated as: A * cos (sqrt(k/m)*t) where A is the amplitude (and the initial position) and t is the time in seconds. The constants were set to: A = 0.5 m = 250.0 dt = 0.1 [[File:M250a1k200dt01t20.pdf-cropped.png]] This is the first simulation, with k set to 200 and run for 20 seconds. The Euler integrator is already unstable, with quickly increasing error as time goes on. All of the other methods are similar for this simulation. [[File:M250a1k10000dt01t20.pdf.png]] The k constant has been increased to 10,000. At this value all of the non-Euler methods are initially similar, but.... [[File:M250a1k10000dt01t200.pdf.png]] This is the same k constant of 10,000 after ~200 seconds. The RK4 integrator is losing energy, while the NSV and Velocity Verlet methods have amplitudes similar to the exact answer. [[File:M250a1k100000dt01t20.pdf.png]] The k constant has been increased to 100,000. The NSV integrator is unstable at this level. The RK4 integrator is almost uniformly zero. The only integrator that is still close to the exact value is the Velocity Verlet integrator. [[File:M250a1k100000dt01t200.pdf.png]] This is the same k constant of 100,000 after ~200 seconds. The Velocity Verlet integrator is doing pretty well here, mostly preserving energy. The RK4 integrator is zero. [[File:M250a1k1000000dt01t20.pdf.png]] The k constant is now 1,000,000. At this level both the RK4 and Velocity Verlet integrators quickly become unstable. ==Detailed Comparison: spring-mass-damper== For realtime dynamics simulations, damping forces are usually applied. The damping force is proportional to the velocity state, while the spring force is proportional to the position state. Acceleration is calculated as: a = (-k*x - c*v)/m where: c = 2*sqrt(k*m) The analytic solution for the position is: (A + B*t)*exp(-w*t) where: w = sqrt(k/m); B = vo + w*xo; The constants were set to: m = 250.0 A = 1.0 xo = 1.0 vo = 0.0 dt = 0.1 Because the Velocity Verlet algorithm shown above isn't technically correct since due to the damper the acceleration depends on the velocity, a modified Velocity Verlet algorithm was added to the comparison which is purported to give better results for these sorts of cases: if (not oldaccel) oldaccel = acceleration(state, t+dt) x += v*dt + 0.5*oldaccel*dt*dt v += 0.5*oldaccel*dt a = acceleration(state, t+dt) v += 0.5*a*dt oldaccel = a [[File:Damped-m250a1k10000dt01t10.png]] Cutting right to the chase, k=10,000 is where the unmodified Velocity Verlet algorithm starts to fall apart. The other integrators are similar, although note that the RK4 solution is right on top of the analytic solution. [[File:Damped-m250a1k15000dt01t10.png]] Increasing k to 15,000 results in the NSV starting to show major inaccuracies. Surprisingly, the Euler algorithm is still stable and doesn't show the same undesirable behavior as the NSV algorithm. [[File:Damped-m250a1k18000dt01t10.png‎]] At k = 18,000, the modified Verlet algorithm becomes unstable and we're left with only the Euler and RK4 algorithms. The Euler algorithm starts to have major error at k = 30,000, and the RK4 does the same at k = 80,000. ==Summary== The results from the spring oscillator and critically damped spring are shown below as rankings for each integrator, with 1 being the best and 4 the worst. The rankings are based on when the method becomes unstable, with accuracy being used as a tie-breaker where necessary. {| cellspacing="0" border="1" !Method !Oscillating Spring !Critically Damped Spring |- !Euler |4 |2 |- !NSV |3 |4 |- !RK4 |2 |1 |- !Velocity Verlet |1 |3 |} It should be noted that for the oscillating spring case, the RK4 integrator resulted in poor accuracy (zero response) while all of the other algorithms except the Euler method were still giving plausible results. Although the RK4 algorithm stayed stable until the same high k values as the Velocity Verlet algorithm, the velocity verlet algorithm's better accuracy at lower k values makes it clearly better for this case. The performance of the Euler, NSV, and Velocity Verlet integrators is similar, with the Euler and NSV methods resulting in slightly less arithmetic. The RK4 has worse performance and is more complicated. In fact, the RK4 results in 4 evaluations of the acceleration function per timestep. If this function is the performance bottleneck, then the other methods could be run with a smaller timestep (0.25*dt) with similar performance, and with a smaller timestep all methods (except the basic Euler) outperform the RK4 algorithm for both cases. The RK4 algorithm is very stable, but it comes at a performance and accuracy cost. The RK4 integrator loses energy and requires much more arithmetic. Better stability and accuracy could be achieved at the same performance level by running the Velocity Verlet algorithm with a smaller timestep. Based on the stability, accuracy, and performance of these integrators, I believe that the best algorithm for general realtime dynamics simulations is the modified Velocity Verlet algorithm. [[Category:Development]] [[Category:Historical]] f1f6a835e1304666db7583d44df1273ef336aec0 Car parameters for vdrift-2009-06-15 and older 0 11 1271 1260 2012-09-01T10:59:55Z Timo 6 3 Update categories wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. [[Category:Cars]] [[Category:Historical]] 8bba5e370c61f8a2523ab691502556bea80801a7 1273 1271 2012-09-01T11:01:25Z Timo 6 3 Update categories wikitext text/x-wiki The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Steering== <pre> max-angle = 33.19 </pre> This defines the maximum angle that the wheels will turn in each direction. For the XS, when the steering wheel is full left, the wheels would be at -33.19 degrees. ==Engine== <pre> position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> position = -0.8, -0.1, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Suspension== Front/rear parameters are broken into two fields. Per-wheel parameters are broken into four fields. In the example below the front suspension is shown, followed by the front left wheel suspension parameters. <pre> [ suspension-front ] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2588 rebound = 2612 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 camber = -1.33 caster = 6.12 toe = 0.0 anti-roll = 8000.0 </pre> <pre> [ suspension-FL ] hinge = 0,0,0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe tags. All angles are in degrees. Note that the suspension position parameter and the max-compression-velocity parameters are no longer used and can be omitted. ==Tire== Front/rear parameters are broken into two fields. In the example below the front tire section is shown. <pre> radius = 0.29 rolling-resistance = 1.3e-2, 6.5e-6 rotational-inertia = 10.0 tread = 0.0 # Lateral force a0=1.6 a1=-38 a2=1201 a3=1914 a4=8.7 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.7 b1=-80 b2=1571 b3=23.3 b4=300 b5=0 b6=0.0068 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 b11=-86 b12=350 # Aligning moment c0=2.3 c1=-3.8 c2=-3.14 c3=-1.16 c4=-7.2 c5=0.0 c6=0.0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 </pre> The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. Radius defines the radius of the tire. The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: <pre> Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 </pre> More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm ==Brakes== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> friction = 0.73 max-pressure = 4.0e6 bias = 0.60 radius = 0.14 area = 0.015 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. ==Driver== <pre> position = -0.62, -0.35, -0.12 mass = 90.0 view-position = -0.64, 0.35, 0.30 hood-mounted-view-position = 0.55, 0, 0.17 view-stiffness = 0.0 </pre> The position and mass affect the weight distribution of the car. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Drag== <pre> position = 0.0, 0.0, 0.2 frontal-area = 2 drag-coefficient = 0.3 </pre> The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. ==Wing== Front/rear parameters are broken into two fields. In the example below the front section is shown. <pre> position = 1.9, 0.0, 0.60 frontal-area = 0.2 drag-coefficient = 0.0 surface-area = 0.3 lift-coefficient = -0.5 efficiency = 0.95 </pre> Downforce can be added with wings. The amount of downforce is determined by the value in the lift-coefficient tag. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== Per-wheel parameters are broken into four fields. In the example below the front left wheel is shown. <pre> position = 1.14, 0.76, -0.47 roll-height = 0.29 mass = 18.14 restitution = 0.1 </pre> ==Contact-points== <pre> mass = 0.05 position-00 = 1.96, 0.37, -0.24 position-01 = 1.96, -0.37, -0.24 position-02 = 1.52, 0.83, 0.16 position-03 = 1.52, -0.83, 0.16 position-04 = -0.10, 0.89, -0.24 position-05 = -0.10, -0.89, -0.24 position-06 = -2.18, -0.83, -0.10 position-07 = -2.18, 0.83, -0.10 </pre> These values are used for weight distribution and balance only. They no longer perform any contact-related function. So, contact-points are the same as particles (defined below), but the syntax is slightly different. ==Particle== These parameters are broken into a series of values starting at 00 and going to some number less than 100. The particle-00 is shown below. <pre> mass = 30.0 position = -1.28, 0.0, -0.36 </pre> These values are used for weight distribution and balance. [[Category:Cars]] [[Category:Files]] [[Category:Historical]] a1c1fb58b5a8c4c3ca1aa7ab40022d9dd4737e14 Car parameters for vdrift-2010-06-30 0 12 1272 192 2012-09-01T11:00:46Z Timo 6 3 Update categories wikitext text/x-wiki * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== A vector of 3 floats ( 1.0, 3.0, 1.5 ) will be interpreted as distances from the car body model origin. See [[Coordinate systems]] for a detailed description. ==Top level parameters== <pre> drive = RWD </pre> The "drive" parameter accepts values "RWD", "FWD", "AWD" that correspond to rear wheel drive, front wheel drive, and all wheel drive, respectively. <pre> version = 2 </pre> The file format version. The only change between version 1 and version 2 is the move to coordinate system version 2, which is described in [[Coordinate systems]]. If no version is specified version 1 is assumed. VDrift is backward compatible with previous file formats. VDrift is not forward compatible with new file formats -- that is, VDrift will refuse to load a file specifying format version 3 if VDrift's code only supports version 2. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== <pre> [differential] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Driver== <pre> [driver] position = -0.35, -0.57, 0.0 view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The position determines driver model position. The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==View== <pre> [view] name-1 = wheel-front-right # observe wheel and chassis moves position-1 = 3.0, 1.0, 0.75 # X(+right), Y(+front), Z(+up) angle-1 = 20.0, 90.0 # +down/-up, +left/-right </pre> Up to 9 additional views are supported(1-9). Position, angle determine camera position, orientation relative to car body. ==Aerodevice== <pre> [aerodevice-2] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> An aerodevice describes the aerodynamics(car body, front/rear wing) of the car. Up to ten devices are supported. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Coilover== <pre> [coilover-front] spring-constant = 49131.9 spring-factor-1 = 0.052, 1.0 spring-factor-2 = 0.055, 1.2 bounce = 2600 rebound = 7900 damper-factor-1 = 0.08,1.0 damper-factor-2 = 0.1, 0.7 travel = 0.19 anti-roll = 800.0 </pre> The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). ==Tire== <pre> [tire-front] size = 215/45r17 type = touring texture = touring </pre> Size determines tire dimensions, weight, inertia of the tire. Tire textures are stored in '''carparts/tire/textures'''. Tire types are stored in '''carparts/tire'''. More info about tire type definition can be found here: [[Tire_parameters]] ==Brake== <pre> [brake-front] friction = 0.4 max-pressure = 4.0e6 bias = 0.65 radius = 0.14 area = 0.015 rotor = rotor_shiny_slotted_drilled </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Some fraction of this value is applied based on the brake pedal. Brake rotor is the optional brake rotor texture. If set a brake rotor model is generated. Rotor textures are stored in '''carparts/brake/textures'''. ==Wheel== <pre> [wheel-0] orientation = left tire = tire-front brake = brake-front model = oem_wheel </pre> The number of wheels is fixed to four(0-3). For a FWD car the wheels 0 and 1 are powered, for RWD the wheels 2, 3. The orientation determines the wheel facing direction. The referenced tire has to be defined in the same car file. The same goes for the brake. The wheel model has to reside in the car folder or '''carparts/wheel'''. ==Suspension== <pre> [suspension-0] coilover = coilover-front wheel-hub = -0.736, 1.14, -0.47 #track front/rear 1471/1509 position = -0.73, 1.14, -0.03 hinge = 0,0,0 camber = -1.33 caster = 6.12 toe = 0.0 ackermann = 0 steering = 33.19 </pre> Suspension has to be defined per wheel. The referenced coilover has to be defined in the same car file. Wheel hub is the wheel position for a fully extended suspension. The position parameter is not used atm. The hinge is the center of the wheel's path as the suspension moves. The location of the hinge is determined by suspension geometry, and may be outside of the car itself. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Particle== <pre> [particle-00] mass = 30.0 position = 0.0, -1.28, -0.36 </pre> These values are used for weight distribution and rotational inertia. Up to 100 particles are supported. Most cars will use 6-10. [[Category:Cars]] [[Category:Files]] [[Category:Historical]] 5fd884300e3ae3f1ccba462bd38c7729f4f6cd11 Enabling force feedback in kernel 0 31 1274 1183 2012-09-01T11:04:59Z Timo 6 3 Update categories wikitext text/x-wiki Here is how to enable force feedback on Ubuntu 8.10 64 bits kernels (should also work on 32 bits ones): ==For the G25 owners== If you use a G25 wheel, you need to patch your kernel to be able to use it in its native mode First create a patch file named G25.patch for the kernel ( patches for 2.6.27 and 2.6.28 are provided ). ===kernel 2.6.27=== diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-ff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-ff.c 2009-02-23 22:21:27.000000000 +0100 @@ -57,6 +57,7 @@ { 0x46d, 0xc286, hid_lgff_init }, /* Logitech Force 3D Pro Joystick */ { 0x46d, 0xc294, hid_lgff_init }, /* Logitech Formula Force EX */ { 0x46d, 0xc295, hid_lgff_init }, /* Logitech MOMO force wheel */ + { 0x46d, 0xc299, hid_lgff_init }, /* Logitech G25 wheel */ { 0x46d, 0xca03, hid_lgff_init }, /* Logitech MOMO force wheel */ #endif #ifdef CONFIG_LOGIRUMBLEPAD2_FF diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-lgff.c 2008-10-10 00:13:53.000000000 +0200 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-lgff.c 2009-02-23 22:23:22.000000000 +0100 @@ -55,6 +55,7 @@ { 0x046d, 0xc286, ff_joystick }, { 0x046d, 0xc294, ff_joystick }, { 0x046d, 0xc295, ff_joystick }, + { 0x046d, 0xc299, ff_joystick }, { 0x046d, 0xca03, ff_joystick }, }; diff -Naur linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c --- linux-source-2.6.27/drivers/hid/usbhid/hid-quirks.c 2009-03-13 18:54:14.000000000 +0100 +++ linux-source-2.6.27.orig/drivers/hid/usbhid/hid-quirks.c 2009-02-23 22:25:45.000000000 +0100 @@ -316,6 +316,7 @@ #define USB_DEVICE_ID_LOGITECH_HARMONY_64 0xc14f #define USB_DEVICE_ID_LOGITECH_EXTREME_3D 0xc215 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 +#define USB_DEVICE_ID_LOGITECH_WHEELG25 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c @@ -625,6 +626,7 @@ { USB_VENDOR_ID_ELO, USB_DEVICE_ID_ELO_TS2700, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_EXTREME_3D, HID_QUIRK_NOGET }, { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEEL, HID_QUIRK_NOGET }, + { USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_WHEELG25, HID_QUIRK_NOGET }, { USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_WIRELESS_OPTICAL_DESKTOP_3_0, HID_QUIRK_NOGET }, { USB_VENDOR_ID_PETALYNX, USB_DEVICE_ID_PETALYNX_MAXTER_REMOTE, HID_QUIRK_NOGET }, { USB_VENDOR_ID_SUN, USB_DEVICE_ID_RARITAN_KVM_DONGLE, HID_QUIRK_NOGET }, ===kernel 2.6.28=== diff -Naur linux-source-2.6.28/drivers/hid/hid-core.c linux-source-2.6.28.patched/drivers/hid/hid-core.c --- linux-source-2.6.28/drivers/hid/hid-core.c 2009-04-08 06:38:33.000000000 +0200 +++ linux-source-2.6.28.patched/drivers/hid/hid-core.c 2009-04-10 14:15:27.000000000 +0200 @@ -1290,6 +1290,7 @@ { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_FORCE3D_PRO) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2) }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL) }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_SIDEWINDER_GV) }, { HID_USB_DEVICE(USB_VENDOR_ID_MICROSOFT, USB_DEVICE_ID_MS_NE4K) }, diff -Naur linux-source-2.6.28/drivers/hid/hid-ids.h linux-source-2.6.28.patched/drivers/hid/hid-ids.h --- linux-source-2.6.28/drivers/hid/hid-ids.h 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-ids.h 2009-04-10 14:12:44.000000000 +0200 @@ -291,6 +291,7 @@ #define USB_DEVICE_ID_LOGITECH_FORCE3D_PRO 0xc286 #define USB_DEVICE_ID_LOGITECH_WHEEL 0xc294 #define USB_DEVICE_ID_LOGITECH_MOMO_WHEEL 0xc295 +#define USB_DEVICE_ID_LOGITECH_G25_WHEEL 0xc299 #define USB_DEVICE_ID_LOGITECH_ELITE_KBD 0xc30a #define USB_DEVICE_ID_LOGITECH_KBD 0xc311 #define USB_DEVICE_ID_S510_RECEIVER 0xc50c diff -Naur linux-source-2.6.28/drivers/hid/hid-lg.c linux-source-2.6.28.patched/drivers/hid/hid-lg.c --- linux-source-2.6.28/drivers/hid/hid-lg.c 2008-12-25 00:26:37.000000000 +0100 +++ linux-source-2.6.28.patched/drivers/hid/hid-lg.c 2009-04-10 14:14:17.000000000 +0200 @@ -304,6 +304,8 @@ .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_MOMO_WHEEL2), .driver_data = LG_FF }, + { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_G25_WHEEL), + .driver_data = LG_FF }, { HID_USB_DEVICE(USB_VENDOR_ID_LOGITECH, USB_DEVICE_ID_LOGITECH_RUMBLEPAD2), .driver_data = LG_FF2 }, { } ==Enabling force feedback in the kernel== ===Prepare to compile a kernel=== Make sure you have everything needed to compile your kernel : sudo apt-get install fakeroot build-essential makedumpfile libncurses5 libncurses5-dev kernel-package sudo apt-get build-dep linux Get the kernel source code : sudo apt-get install linux-source Now we are ready to start : Prepare your environment: mkdir ~/src cd ~/src tar xjvf /usr/src/linux-source-<version>.tar.bz2 cd linux-source-<version> ===Apply the G25 patch if needed=== Copy the G25.patch file into the source directory ( ~/src ) and patch -p1 <../G25.patch The output should be something like that: patching file drivers/hid/usbhid/hid-ff.c patching file drivers/hid/usbhid/hid-lgff.c patching file drivers/hid/usbhid/hid-quirks.c ===Configure the new kernel=== Get the running kernel configuration: cp -vi /boot/config-`uname -r` .config Adjust the kernel configuration: make oldconfig make menuconfig Go to Device Drivers , and HID Devices and enable the following options Force feedback support (EXPERIMENTAL) PID device support Logitech devices support Logitech Rumblepad 2 support PantherLord/GreenAsia based device support ThrustMaster devices support Zeroplus based game controller support With the 2.6.27 kernel on Ubuntu 8.10, I have to disable paravirtualized guest support otherwise the kernel cleaning fail. This is not needed on 2.6.28 on Ubuntu 9.04 beta (2.6.28.11) Go to Processor type and features and disable the following: Paravirtualized guest support ===Compile and package the new kernel=== make-kpkg clean fakeroot make-kpkg --initrd --append-to-version=-ff kernel-image kernel-headers You now have 2 new package files in ~/src. ===Install the new kernel=== sudo dpkg -i linux-image-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb linux-headers-2.6.27.18-ff_2.6.27.18-ff-10.00.Custom_amd64.deb [[Category:Configuration]] 6cd17594417c1377ff3e2d9731f4fe09d3108092 Old Method of Compiling on Linux 0 60 1275 739 2012-09-01T11:05:23Z Timo 6 3 Update categories wikitext text/x-wiki {{note|This page is deprecated and only kept for future reference. See [[Installing]] for current information.}} ==Linux== ===Prerequisites=== Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. The required build tools include: * '''g++''' - The GNU C++ compiler * '''scons''' - A replacement for Make The required libraries include: * '''libsdl''' - Simple Direct Media Layer * '''libglew''' - OpenGL extension utilities * '''sdl-gfx''' - Graphics drawing primitives library for SDL * '''sdl-image''' - Image file loading library for SDL * '''vorbisfile''' - File loading library for the ogg vorbis format * '''libvorbis''' - The Vorbis General Audio Compression Codec * '''libbullet''' - Bullet Physics Library * '''libcurl''' - the multiprotocol file transfer library * '''libarchive''' - library for reading and writing archive formats * Boost C++ Libraries (header-file-only) * ASIO C++ Libraries (header-file-only) Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. For Ubuntu, all the required packages may be installed using this command: sudo apt-get install g++ scons libsdl-gfx1.2-dev libsdl-image1.2-dev libsdl-net1.2-dev libvorbis-dev libglew-dev libbullet-dev libasio-dev libboost-dev libcurl4-gnutls-dev libarchive-dev For Ubuntu 8.04 you additionally need: sudo apt-get install libboost-date-time-dev libboost-regex-dev {{note|VDrift requires libglew version greater than 1.5.3.}} For Ubuntu: * https://launchpad.net/~amuzen/+archive/ppa * Or download http://glew.sourceforge.net/ the zipped or tared version of glew (repo one doesn't build) and do "make; sudo make install" ====Bullet==== As of SVN R2358 (2009-06-15 release and later), no steps are required to build bullet and you can continue to the next section. For the 2009-02-15 release, the only step required is to expand the Bullet source archive: tar zxvf bullet-2.73-sp1.tgz {{note|For older versions of VDrift, you will need to follow the [[Old Method of Compiling Bullet]].}} ====SCons==== As of the 2005-10-02 release, VDrift no longer uses ./configure, make, etc. (autotools). Now the project is built with [http://scons.org/ SCons]. You may want to read a little about [[Using SCons]]. There are two ways to use SCons. The first way is to install scons on your system through your package manager, then you can use it simply by the name of the program, "scons". If you followed the directions for installing prerequisites for Ubuntu above, then you're done and can continue on to the next section. The second way is to use the scons-local package (included with VDrift) which will do the same thing but doesn't require that you install scons on your system. To do this, you must move the scons-local-0.96.95.tar.gz archive from tools to the root vdrift folder, un-tar the archive, and then use the <code>./scons.py</code> command instead of <code>scons</code>. ===Get the Code=== You can get the code from a source package for a particular version, or you can [[Getting the development version|get the development version]]. ====Source Package==== [http://sourceforge.net/project/showfiles.php?group_id=137283 Download] the latest VDrift Linux source package. All the files in the package are in a directory called vdrift-'''version'''-src where '''version''' is something like 2009-06-15. Unpack the archive. tar jxvf vdrift-2009-06-15-src.tar.bz2 =====Enter directory===== Now change directories into the location of your newly created VDrift source tree. cd vdrift-2009-06-15 ====Optional: Using scons-local instead of installing SCons==== If you have decided not to install SCons on your system, you can use scons-local. To set it up, do the following: tar zxvf tools/scons-local-0.96.1.tar.gz {{note|Some of the following steps refer to the <code>scons</code> command, you should now replace that with <code>./scons.py</code>.}} ===Compiling=== To compile VDrift, just use the <code>scons</code> command. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the '''arch''' option. scons arch=a64 Compiling VDrift in '''release''' mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode. scons release=1 {{note|These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance.}} ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target '''install'''. This command must be run as root. sudo scons install {{note|The <code>scons install</code> process was broken for several releases including the 2009-02-15 release and may fail to install needed datafiles. If you have release 2009-02-15 or earlier, run "sudo scons install" as noted above and then manually re-copy the data files to the installed destination folder: sudo cp -r data/* /usr/share/games/vdrift/data}} ====Optional: Installation Location==== You can change the installation prefix. For example, if you want VDrift to go in <code>/usr/local/share/games/vdrift</code>, you can change the '''prefix''' setting. scons install prefix=/usr/local {{note|There are many more build and install options, see the [[Using SCons]] page for more information.}} ===Running=== For release 2009-02-15 and earlier, if you used the default install locations, VDrift can be run with the command: /usr/share/games/vdrift/bin/vdrift For release 2009-06-15 and later, if you used the default install locations, VDrift can be run with the command: /usr/local/bin/vdrift [[Category:Development]] [[Category:Historical]] 63a557a0df80274c3a48ffa739e9f8be21ad4f44 Using SCons 0 86 1276 1025 2012-09-01T11:09:33Z Timo 6 3 Update categories wikitext text/x-wiki [http://scons.org/ SCons] is a replacement for autotools written in Python. {{note|Throughout the <code>scons</code> command will be used; if you are using scons-local that is distributed with VDrift you'll need to replace every instance of <code>scons</code> with <code>./scons.py</code>.}} ==Compile== To [[Compiling|compile VDrift]], simply run SCons. It reads the root level SCons configuration file, SConstruct, as well as the configuration files in subdirectories (called SConscript), when it is run to see what to do. scons SCons starts by checking your system for available libraries. If things go well, this will look something like this: you@yourcomputer:~/games/vdrift$ scons scons: Reading SConscript files ... Checking for main() in C library GL... yes Checking for main() in C library GLU... yes Checking for main() in C library openal... yes Checking for C++ header file SDL/SDL.h... yes Checking for C++ header file SDL/SDL_image.h... yes Checking for C++ header file SDL/SDL_net.h... yes scons: done reading SConscript files. Now, SCons will begin compiling VDrift, one file at a time, starting with the Vamos files and ending with linking the main executable. When changes to the source files are made, <code>scons</code> must be run again to update the build. ==Clean== When building a project it is sometimes necessary to "clean" a build (remove all files produced by the build). This can be done with the <code>-c</code> flag: scons -c All the object and binary executable files will be removed. Then when you run <code>scons</code> again, all the files will be rebuilt. ==Help== If you wish to list the options available at build time you may do so by executing <code>scons -h</code>. This will show all the available options, their default values, and their current values. ==Quiet== If you want SCons to give less verbose output when compiling use the <code>-Q</code> option. [[Category:Development]] ff32c5cb4343c805cfa59fd35ff790f94e609b65 Listedit tool 0 51 1277 1193 2012-09-01T11:09:58Z Timo 6 3 Update categories wikitext text/x-wiki Listedit is part of the [[Track editor]] tools that simplifies working on [[Track files and formats#objects/list.txt|list.txt]] files. It is a command line style program. ==list.txt format== The list.txt file contains object definitions in sections, separated by a blank line. A description of each field in the list.txt file can be found at the following location: https://github.com/VDrift/trackeditor/blob/master/listedit/format.txt The numbers next to each of the lines is important to the way the listedit program works. ==Commands== The basic commands are * '''load''' * '''save''' * '''ls''' * '''set''' * '''quit''' * '''addparam''' Load, save, and quit are obvious. You can supply arguments to load and save to specify the file if you want. The ls and set commands work using the object list file format. ===ls=== The first argument to ls is the object property you want to search. For example, specify 1 if you want to search objects based on the texture filename. The second argument to ls is what you want to search for. You can use * and ? wildcards. For example, to find all of the objects that use a texture called sky*, you'd do: ls 1 sky* To find all of the objects that have the skybox property set to true (1), do: ls 4 1 ===set=== The '''set''' command is similar to '''ls'''. It allows you to both search for objects and set their properties in one step. The first two arguments to set are exactly the same as ls. The second two arguments the property you want to set on the objects that match your search. For example, say want to set the skybox property to true for all objects that have a texture starting with "sky"... you'd do: set 1 sky* 4 1 {{note|All of the objects will start with default properties.}} ===addparam=== This command takes 1 argument. This command will add one parameter to each object and is primarily used when upgrading a list.txt file from an old version (say, with 14 parameters per object) to a new version (say, with 15 parameters per object). The argument is the default value that all objects will start with for the new parameter. [[Category:Tracks]] 42f9c9fee11723ba746e306c0de0c708ef4ebdc0 Category:Cars 14 118 1278 1163 2012-09-01T11:16:06Z Timo 6 3 Add link to Italian page wikitext text/x-wiki <small>[[:Category:Cars|English]] - [[:Category:Autovetture|Italiano]]</small> These pages contain information about VDrift cars. 60a0c2b3f94233d1d6b524b81b963c262e356bf2 Category:Autovetture 14 128 1279 2012-09-01T11:16:19Z Timo 6 3 Add link to English page wikitext text/x-wiki <small>[[:Category:Cars|English]] - [[:Category:Autovetture|Italiano]]</small> 9cad8de168047bacbafbba1f1e6e8eba3dbb24c0 Getting cars/it 0 35 1280 1148 2012-09-01T11:16:55Z Timo 6 3 Update categories wikitext text/x-wiki <small>[[Getting cars|English]] - [[Getting cars/it|Italiano]]</small> ==Aggiungere altre autovetture== Questo articolo spiega come si aggiungono altre autovetture per VDrift e come si installano. ==Trovare ulteriori autovetture== * Una gamma di autovetture si possono trovare sul sito [http://cars.vdrift.net cars.vdrift.net]. Apri semplicemente la pagina dell'autovettura che vuoi scaricare e se lo stato visualizza ''playable'' è possibile utilizzarlo per giocare con VDrift. Quindi scarichi il file .zip o .tar.gz * Puoi anche scaricare autovetture da svn. Clicca i link nell'[[List of cars|elenco di autovetture]] (per il momento disponibile solo in inglese) per andare sulla pagina e quindi clicca sul link 'Download GNU Tarball'. ==Installare le autovetture== A questo punto dovresti disporre di un file .zip o .tar.gz. Entrambi sono formati compattati. Per scompattare i files puoi utilizzare software come '''Ark''' o '''File roller''' per Linux e [http://www.7-zip.org/ 7zip] per Windows. Sono tutti software liberi. Durante la scompattazione normalmente si crea una cartella con il nome dell'autovettura. Questa cartella (che dovrebbe contenere files che si chiamano about.txt e body.joe) nella cartella '''... vdrift/data/cars'''. Quindi eseguire VDrift e la nuova autovettura è pronta per essere guidata! [[Category:Autovetture]] baf5857dbeff6850ddef993b762e10ef4591fef6 Tire parameters 0 82 1281 1215 2012-09-01T11:17:36Z Timo 6 3 Update categories wikitext text/x-wiki Example from '''carparts/tire/touring''': restitution = 0.1 tread = 0.25 rolling-resistance = 1.3e-2, 6.5e-6 # Lateral force a0=1.55 a1=-55 a2=1750 a3=1900 a4=7.2 a5=0.014 a6=-0.24 a7=1.0 a8=-0.03 a9=-0.0013 a10=-0.15 a111=-8.5 a112=-0.29 a12=17.8 a13=-2.4 # Longitudinal force b0=1.65 b1=-110 b2=1800 b3=23.3 b4=410 b5=0.075 b6=0 b7=0.055 b8=-0.024 b9=0.014 b10=0.26 # Aligning moment c0=2.2 c1=-4.3 c2=-4.4 c3=-1.9 c4=-9.6 c5=0.0225 c6=0 c7=0.044 c8=-0.58 c9=0.18 c10=0.043 c11=0.048 c12=-0.0035 c13=-0.18 c14=0.14 c15=-1.029 c16=0.27 c17=-1.1 Restitution defines tire restitution (not implemented atm). The tread parameter ranges over arbitrary values of 0.0 to 1.0, where 0.0 is a road tire and 1.0 is an off-road tire. The two elements of rolling-resistance are the constant and velocity-squared terms, respectively. The longitudinal, transverse, and aligning section each contain a vector of “magic formula” coefficients as presented in Motor Vehicle Dynamics, Genta (1997). A description is shown below: Shape factor ........................................... A0 Load infl. on lat. friction coeff (*1000)... (1/kN) .... A1 Lateral friction coefficient at load = 0 (*1000) ....... A2 Maximum stiffness ........................ (N/deg) ..... A3 Load at maximum stiffness ................ (kN) ........ A4 Camber infiuence on stiffness ............ (%/deg/100) . A5 Curvature change with load ............................. A6 Curvature at load = 0 .................................. A7 Horizontal shift because of camber ........(deg/deg).... A8 Load influence on horizontal shift ........(deg/kN)..... A9 Horizontal shift at load = 0 ..............(deg)........ A10 Camber influence on vertical shift ........(N/deg/kN)... A111 Camber influence on vertical shift ........(N/deg/kN**2) A112 Load influence on vertical shift ..........(N/kN)....... A12 Vertical shift at load = 0 ................(N).......... A13 Shape factor ........................................... B0 Load infl. on long. friction coeff (*1000)... (1/kN) ... B1 Longitudinal friction coefficient at load = 0 (*1000)... B2 Curvature factor of stiffness ............ (N/%/kN**2) . B3 Change of stiffness with load at load = 0 (N/%/kN) ..... B4 Change of progressivity of stiffness/load (1/kN) ....... B5 Curvature change with load ............................. B6 Curvature change with load ............................. B7 Curvature at load = 0 .................................. B8 Load influence on horizontal shift ....... (%/kN) ...... B9 Horizontal shift at load = 0 ............. (%) ......... B10 Load influence on vertical shift ......... (N/kN) ...... B11 Vertical shift at load = 0 ............... (N) ......... B12 Shape factor ........................................... C0 Load influence of peak value ............ (Nm/kN**2) ... C1 Load influence of peak value ............ (Nm/kN) ...... C2 Curvature factor of stiffness ........... (Nm/deg/kN**2) C3 Change of stiffness with load at load = 0 (Nm/deg/kN) .. C4 Change of progressivity of stiffness/load (1/kN) ....... C5 Camber influence on stiffness ........... (%/deg/100) .. C6 Curvature change with load ............................. C7 Curvature change with load ............................. C8 Curvature at load = 0 .................................. C9 Camber influence of stiffness .......................... C10 Camber influence on horizontal shift......(deg/deg)..... C11 Load influence on horizontal shift........(deg/kN)...... C12 Horizontal shift at load = 0..............(deg)......... C13 Camber influence on vertical shift........(Nm/deg/kN**2) C14 Camber influence on vertical shift........(Nm/deg/kN)... C15 Load influence on vertical shift..........(Nm/kN)....... C16 Vertical shift at load = 0................(Nm).......... C17 More information can be found at http://members.xoom.virgilio.it/adiaforo/epcjk.htm or if it's down try http://web.archive.org/web/20050913052226/http://members.xoom.virgilio.it/adiaforo/epcjk.htm There is a graphical tire parameters editor to adjust/review the parameters: http://svn.vdrift.net/viewvc.cgi [[Category:Cars]] [[Category:Files]] a56c38e87aa1eda798612ed0b0dda4a0338d9f5c Category:Historical 14 129 1282 2012-09-01T11:20:08Z Timo 6 3 Historical information wikitext text/x-wiki These pages contain information that is no longer true for the latest versions of VDrift or is generally outdated, but is kept for those who may still be running old versions, or for general interest. 0100c47453d3ddff3d6378ed38ff3fca1d2faac8 Car parameters 0 9 1283 1264 2013-04-03T09:49:20Z NaN 4 /* Brake */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png mesh = rotor.joe # overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] a0bd142c7a162db56326bccdaef7543d68bffa3a 1284 1283 2013-04-03T09:51:52Z NaN 4 /* Brake */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 155e7a5431b7350aaf5115726519045197afcc2e 1285 1284 2013-04-03T09:52:18Z NaN 4 /* Particle */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10 mass particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 656e768e838ba178efc36dc818e34806e8234eeb 1286 1285 2013-04-03T09:53:37Z NaN 4 /* Tire */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png # optional, enables auto-generated tire mesh #mesh = tire.joe # optional, overrides auto-generated tire mesh size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10 mass particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 99ee25f3b9d332180f0ee19aafdfd11b957ae2f2 1287 1286 2013-04-03T09:53:59Z NaN 4 /* Brake */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png # optional, enables auto-generated tire mesh #mesh = tire.joe # optional, overrides auto-generated tire mesh size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh #mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10 mass particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] a3ed604ce3a3e371912af9ee5cda044a3a784ea0 1288 1287 2013-04-03T09:57:25Z NaN 4 /* Wheel */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe # if genrim not set to false, mesh is used as wheel disk(spokes), rim will be auto-generated #genrim = false # optional, disables auto-generated rim mesh position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png # optional, enables auto-generated tire mesh #mesh = tire.joe # optional, overrides auto-generated tire mesh size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh #mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle.00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> These values are used for weight distribution and rotational inertia. Most cars will use 6-10 mass particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 6ac7cefffeacd91276ca629147923c8039a4fa5a 1289 1288 2013-04-03T09:58:55Z NaN 4 /* Particle */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera] view-position = -0.35, -0.64, 0.30 hood-mounted-view-position = 0, 0.55, 0.17 view-stiffness = 0.0 </pre> The view positions define 3D coordinates for camera placement. The view-stiffness parameter defines the stiffness of the camera bounce effect, where 0.0 is a sports car and 1.0 is F1-ish. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe # if genrim not set to false, mesh is used as wheel disk(spokes), rim will be auto-generated #genrim = false # optional, disables auto-generated rim mesh position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png # optional, enables auto-generated tire mesh #mesh = tire.joe # optional, overrides auto-generated tire mesh size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh #mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle-00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> Mass particles used for weight distribution and rotational inertia. Most cars will use 6-10 particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 9a8de61e128de425fe5cd9e8e20d1ee016a518c2 1290 1289 2013-04-03T10:06:04Z NaN 4 /* Camera */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera.1] name = driver # name to identify camera, default values are hood, driver, chase rigid, chase loose orbit and free type = mount # supported types are mount, chase, orbit, free position = -0.023, -0.32, 0.50 # camera position relative to car lookat = -0.023, 0.32, 0.3 # optional, defines camera view direction stiffness = 0.0 # optional, bounce effect, 0.0 is a sports car and 1.0 is F1-ish. fov = 90 # optional, overrides default field of view angle </pre> ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe # if genrim not set to false, mesh is used as wheel disk(spokes), rim will be auto-generated #genrim = false # optional, disables auto-generated rim mesh position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png # optional, enables auto-generated tire mesh #mesh = tire.joe # optional, overrides auto-generated tire mesh size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh #mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle-00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> Mass particles used for weight distribution and rotational inertia. Most cars will use 6-10 particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 217e76a6025bab0bc90a40444831258040e86836 1291 1290 2013-04-03T10:07:46Z NaN 4 /* Camera */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera.1] name = driver # name to identify camera, default values are hood, driver, chase rigid, chase loose orbit and free type = mount # supported types are mount, chase, orbit, free position = -0.023, -0.32, 0.50 # camera position relative to car lookat = -0.023, 0.32, 0.3 # optional, defines camera view direction stiffness = 0.0 # optional, bounce effect, 0.0 is a sports car and 1.0 is F1-ish. fov = 90 # optional, overrides default field of view angle </pre> VDrift supports an arbitrary number of cameras per car. The default minimum count is 6, camera.0 - camera.5. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe # if genrim not set to false, mesh is used as wheel disk(spokes), rim will be auto-generated #genrim = false # optional, disables auto-generated rim mesh position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png # optional, enables auto-generated tire mesh #mesh = tire.joe # optional, overrides auto-generated tire mesh size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh #mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle-00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> Mass particles used for weight distribution and rotational inertia. Most cars will use 6-10 particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 4373ffa08c19eb581cfd149cca5df248aff69460 1292 1291 2013-04-03T10:08:15Z NaN 4 /* Camera */ wikitext text/x-wiki * [[Car parameters for vdrift-2010-06-30]] * [[Car parameters for vdrift-2009-06-15 and older]] The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. For unit conversion you can go to: [http://www.sonar-equipment.com/useful_conversion_factors_table1_p00.htm ''This Site'']. The .car file contains several sections. Each section will now be described, along with example values from the XS.car file. The XS has performance comparable to the Honda S2000. ==Coordinate system== The .car files use the [http://en.wikipedia.org/wiki/Cartesian_coordinate_system#In_three_dimensions right-handed (positive)] coordinate system for all parameters: * '''x axis''': negative is left, positive is right * '''y axis''': negative is back, positive is forward * '''z axis''': negative is down, positive is up ==Common Parameters== <pre> [section] texture = diffuse.png, misc1.png, misc2.png mesh = model.joe position = 0.736, 1.14, -0.47 rotation = 0, 0, 30 scale = -1, 1, 1 color = 0.8, 0.1, 0.1 draw = transparent mass = 40 </pre> Every car section supports a set of optional parameters to describe its graphic representation. Texture is a list of textures that has to contain at least one texture, usually the diffuse color texture. Mesh defines the model mesh to be used with the texture. Texture and mesh paths are relative to car(XS) and carparts(shared components) directory. Position/rotation(in degrees)/scale will transform the mesh relative to parent. Color defines the color of the mesh(to be blended with the texture according to its alpha channel). Draw allows the options transparent(according to first textures alpha channel) or emissive(won't be affected by lighting, used for brake/reverse light models). Mass is used to calculate car inertia, weight and center of mass. ==Engine== <pre> [engine] position = 0.86, 0.0, -0.21 mass = 140.0 max-power = 1.79e5 peak-engine-rpm = 7800.0 rpm-limit = 9000.0 inertia = 0.25 idle = 0.02 start-rpm = 1000 stall-rpm = 350 fuel-consumption = 1e-9 torque-friction = 0.0003 torque-curve-00 = 1000, 140.0 torque-curve-01 = 2000, 149.14 torque-curve-02 = 2200, 145.07 torque-curve-03 = 2500, 147.78 torque-curve-04 = 3000, 169.50 torque-curve-05 = 3300, 172.19 torque-curve-06 = 4000, 169.50 torque-curve-07 = 4500, 166.77 torque-curve-08 = 5600, 172.19 torque-curve-09 = 5800, 170.83 torque-curve-10 = 6000, 168.12 torque-curve-11 = 6100, 177.61 torque-curve-12 = 6200, 186.42 torque-curve-13 = 6300, 192.53 torque-curve-14 = 6500, 195.92 torque-curve-15 = 6700, 195.92 torque-curve-16 = 7000, 195.24 torque-curve-17 = 7600, 190.49 torque-curve-18 = 8000, 184.39 torque-curve-19 = 8200, 183.04 torque-curve-20 = 8300, 146.43 torque-curve-21 = 9500, 146.43 </pre> The position and mass parameters affect the weight distribution of the car. The torque curve is calculated from max-power and peak-engine-rpm using a polynomial expression given in Motor Vehicle Dynamics, Genta (1997), where peak-engine-rpm is the engine speed at which the maximum power output (max-power) is achieved. Alternatively, the torque curve can be explicitly defined, as in the example above. A rev limit can be set with rpm-limit. The rotational inertia of the moving parts is inertia. Idle is the throttle position at idle. Starting the engine initially sets the engine speed to start-rpm. Letting the engine speed drop below stall-rpm makes the engine stall. The rate of fuel consumption is set with fuel-consumption. The actual fuel consumed each second (in units of liters) is the fuel-consumption parameter times RPM times throttle (throttle is from 0.0 to 1.0, where 1.0 is full throttle). ==Clutch== <pre> [clutch] sliding = 0.27 radius = 0.15 area = 0.75 max-pressure = 11079.26 </pre> The clutch is described by its sliding friction coefficient, radius, area and maximum applied pressure. The torque capacity(maximum transmitted torque) of the clutch is TC = sliding * radius * area * max-pressure. It should be somewhere between one and two times the maximum enine torque. TC = 1.25 * max-engine-torque is a good start value. ==Transmission== <pre> [transmission] gears = 6 gear-ratio-r = -2.8 gear-ratio-1 = 3.133 gear-ratio-2 = 2.045 gear-ratio-3 = 1.481 gear-ratio-4 = 1.161 gear-ratio-5 = 0.943 gear-ratio-6 = 0.763 shift-time = 0.2 </pre> The number of forward gears is set with the gears parameter. The gear ration for reverse and all of the forward gears is then defined. The shift-time tag tells how long it takes, in total seconds, to change gears (when autoclutch is enabled). Half the time is spent changing the gear and the other half is spent letting the clutch out. This parameter is not required and defaults to 0.2 seconds, which is a reasonable value for a manual transmission. F1 cars take about 50 ms, by comparison. ==Differential== For '''FWD''' cars [differential.front] has to be defined. '''AWD''' cars require [differential.front], [differential.rear] and [differential.center]. <pre> [differential.rear] final-drive = 4.100 anti-slip = 600.0 anti-slip-torque = 1 anti-slip-torque-deceleration-factor = 0 </pre> The final drive provides an additional gear reduction. The anti-slip parameter defines the maximum anti-slip torque. For speed-sensitive differentials, it also defines the anti-slip torque per radian per second of speed difference between the wheels. If the differential is speed-sensitive, the anti-slip-torque and anti-slip-torque-deceleration-factor parameters must be omitted or set to zero. If the differential is torque-sensitive, then anti-slip-torque defines the amount of anti-slip torque per input torque. The anti-slip-torque-deceleration-factor defines the amount of anti-slip torque per negative input torque. For a 1-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to zero, for a 2-way torque-sensitive LSD, set anti-slip-torque-deceleration-factor to 1.0, for 1.5-way, set it between 0.0 and 1.0. ==Fuel tank== <pre> [fuel-tank] position = 0.0, -1.0, -0.26 capacity = 0.0492 volume = 0.0492 fuel-density = 730.0 </pre> The fuel tank's position, the current volume of fuel and the density of the fuel affect the car's weight distribution. The capacity tag sets the maximum volume of fuel that the tank can hold. The initial volume is set with the volume tag. The density of the fuel is set with fuel-density. ==Camera== <pre> [camera.1] name = driver # name to identify camera, default values are hood, driver, chase rigid, chase loose, orbit and free type = mount # supported types are mount, chase, orbit, free position = -0.023, -0.32, 0.50 # camera position relative to car lookat = -0.023, 0.32, 0.3 # optional, defines camera view direction stiffness = 0.0 # optional, bounce effect, 0.0 is a sports car and 1.0 is F1-ish. fov = 90 # optional, overrides default field of view angle </pre> VDrift supports an arbitrary number of cameras per car. The default minimum count is 6, camera.0 - camera.5. ==Wing== <pre> [wing.rear] position = 0.0, -2.14, 0.37 frontal-area = 0.05 drag-coefficient = 0.0 surface-area = 0.5 lift-coefficient = -0.7 efficiency = 0.95 </pre> Wing identifiers front, center, rear are arbitrary(can be chosen freely). A wing describes the aerodynamics(car body, front/rear wing) of the car. A car has to have at least one wing, to capture body drag. Most cars will use up to three. The frontal area and coefficient of drag, set with frontal-area and drag-coefficient, are used to calculate the drag force. Downforce can be added with the optional parameters surface-area, lift-coefficient, efficiency. If the lift coefficient is positive, upforce is generated. This is usually undesirable for cars. The efficiency determines how much drag is added as downforce increases. The surface-area is the surface area of the wing. This value is also used in the drag calculation. ==Wheel== <pre> [wheel.fl] texture = oem_wheel.png, oem_wheel-misc1.png mesh = oem_wheel.joe # if genrim not set to false, mesh is used as wheel disk(spokes), rim will be auto-generated #genrim = false # optional, disables auto-generated rim mesh position = -0.736, 1.14, -0.47 #track front/rear 1471/1509 camber = 0.5 caster = 6.0 toe = -0.16 ackermann = 8.46 # 50% ackermann steering = 30 </pre> The number of wheels is fixed to four: fl, fr, rl, rr. For a FWD car the wheels fl and fr are powered, for RWD the wheels rl and rr. The wheel mesh is the wheel disk mesh(wheel mesh without rim). The mesh will be scaled according to tire dimensions, has to fit into a unit cube. The rim mesh is generated automatically. Wheel alignment is set with the camber, caster, and toe. All angles are in degrees. For a "negative camber" the left wheel camber has to be negative, the right wheel camber positive. Ackermann and steering are optional. Ackermann is the steering arm angle relative to wheel. Ideal ackermann(100%) is atan(0.5* track / wheelbase). For the right wheel positive ackermann is positive, for the left negative. Steering is the maximum steering angle of the wheel(for ackermann = 0). A negative steering leads to a reverted steering. ==Suspension== <pre> [wheel.fl.hinge] wheel = -0.736, 1.14, -0.47 chassis = 0.0, 0.99, -0.55 </pre> Suspension has to be defined per wheel. Hinge suspension is equivalent to a parallel double wishbone setup. The hinge link is attached at chassis to car body and at wheel to wheel hub. <pre> [wheel.fl.macpherson-strut] strut-top = -0.66, 1.34, 0.05 strut-end = -0.70, 1.34, -0.505 hinge = -0.36, 1.34, -0.44 </pre> Alternatively a macpherson-strut setup can be used. Hinge is the lower link attachment point to car body. The wheel attachment point is the wheel hub position. ==Coilover== <pre> [wheel.fl.coilover] spring-constant = 49131.9 bounce = 2600 rebound = 7900 damper-factor-1 = 0.06, 1.2 damper-factor-2 = 0.08, 1.1 damper-factor-3 = 0.1, 1 damper-factor-4 = 0.2, 0.9 damper-factor-5 = 0.5, 0.5 damper-factor-6 = 1, 0.3 damper-factor-7 = 5, 0.1 travel = 0.19 anti-roll = 800.0 </pre> Each wheel has a coilover(spring-damper unit). The spring-constant is the '''wheel rate''' in N/m. The spring-factor-1 and 2 parameters define a curve for the spring response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is the suspension displacement in meters and y is the factor to be applied to the spring coefficient. In this example, the spring factor will be 1.0 when the displacement is between 0 and 0.052 m, and then the spring factor will change linearly to 1.2 at 0.055 m (and beyond). The spring factor gets multiplied by the spring-constant. You can put as many spring-factor points as you want (just increase the spring-factor- number for each additional point). Note that displacement values are relative to the "zero g", "zero force" position. For best results, start VDrift with the -debug option and observe suspension displacements during maneuvering to determine where you want to put your points. The bounce and rebound parameters are the damping coefficients for compression and expansion of the suspension, respectively, in units of N/m/s. The damper-factor-1 and 2 parameters define a curve for the damper response. These can be omitted if desired, in which case a factor of 1.0 will be used everywhere. Points are defined by specifying an x,y pair where x is an absolute value of suspension velocity in m/s and y is the factor to be applied to the damping coefficient. In this example, the damper factor will be 1.0 when the compression velocity absolute value is between 0 and 0.08 m/s, and then the damper factor will change linearly to 0.7 at 0.1 m/s (and beyond). The damper factor gets applied to the bonce or rebound damper coefficient, depending on the direction of travel. You can put as many damper-factor points as you want (just increase the damper-factor- number for each additional point). The travel is the maximum wheel travel from wheel extended position. Anti-roll in N/m is currently incorrectly associated with the wheel coilover, acts between front wheels fl and fr and rear wheels rl and rr. ==Tire== <pre> [wheel.fl.tire] texture = tire/touring.png # optional, enables auto-generated tire mesh #mesh = tire.joe # optional, overrides auto-generated tire mesh size = 215, 45, 17 type = &tire/touring </pre> Tire size determines tire dimensions: * section width in millimeters, measured from sidewall to sidewall * ratio of sidewall height to section width in percent * diameter of the wheel in inches Each wheel has a tire section. Tire size is used to calculate wheel weight and inertia. The tire mesh is optional and has to be centered at origin and fit into a unit box. It will be scaled according to tire dimensions. If omitted a default mesh is generated/used. Tire type is a tire subsection [wheel.fl.tire.type], here a reference. This means car loader will look for a [tire/touring] section and alternatively for a file tire/touring relative to car and carparts directory. The first found section definition is used. More info about tire type definition can be found here: [[Tire parameters]] ==Brake== <pre> [wheel.rl.brake] texture = rotor_shiny_slotted_drilled.png # optional, enables auto-generated disk mesh #mesh = rotor.joe # optional, overrides auto-generated brake disk mesh friction = 0.6 max-pressure = 4.0e6 bias = 0.45 radius = 0.14 area = 0.015 handbrake = 1.0 </pre> The bias parameter is the fraction of braking pressure applied to the front brakes (in the front <span class="plainlinks">[http://how2gainweightfast.org <span style="color:black;font-weight:normal;text-decoration:none!important;background:none!important; text-decoration:none;">weight gain</span>]</span> brake section) or the rear brakes (in the rear brake section). To make sense, the rear value should equal 1.0 minus the front value. The maximum brake torque is calculated as friction * area * bias * max-pressure * radius. Handbrake determines the handbrake influence factor. Texture is an optional brake rotor texture. If set a brake disk mesh is generated from brake parameters. This mesh can be overridden by providing a custom brake mesh. ==Steering== <pre> [steering] texture = steering_wheel.png mesh = steering_wheel.joe position = -0.37, 0.44, 0.09 rotation = 87.5, 0.0, 0.0 max-angle = 320 </pre> Steering defines the steering device. The rotation of the steering model is constrained by max-angle. The rotation axis is the local z-axis of the steering mesh. ==Particle== <pre> [particle-00] position = 0.0, -1.28, -0.36 mass = 30.0 </pre> Mass particles used for weight distribution and rotational inertia. Most cars will use 6-10 particles. ==Light== <pre> [light-brake] texture = brake.png mesh = body.joe draw = emissive [light-reverse] texture = reverse.png mesh = body.joe draw = emissive </pre> Car lights are treated as car shape models. light-brake is set emissive during braking, light-reverse if reverse gear is selected. ==Car shape== <pre> [driver] texture = driver2.png, driver-misc1.png mesh = driver.joe position = -0.37, 0.07, 0.05 mass = 90.0 [body] texture = body00.png mesh = body.joe [interior] texture = interior.png mesh = interior.joe [glass] texture = glass.png mesh = glass.joe draw = transparent </pre> The car shape can consist of an arbitrary number of models with arbitrary names excluding the reserved ones: engine, clutch, ... Shape hierarchies [body.foo] are not supported. [[Category:Cars]] [[Category:Files]] 2d8e3ed491d8a8b4a19421115687f400f50d2f59 Car files and formats 0 125 1293 1262 2013-04-03T10:16:57Z NaN 4 wikitext text/x-wiki {{note|Recent VDrift releases (2012) do not rely on a fixed set of geometry files(JOE) and textures(PNG/DDS). Instead car geometry/textures are set in the CARNAME.car file. See [[car parameters]] for details.}} Files within a car's folder: *CARNAME.car: [[Configfile_format]], list of [[car parameters]]. *about.txt: text format, first line contains the car name, other lines contain additional info. *body.joe: [[JOE format]], car body geometry. *body00.png: PNG format, the body.joe UV texture. Additional body textures and colors can be placed in the folder using names body01.png, body02.png, etc. *brake.png: PNG format, an additive texture using the body.joe UV texture containing brake lights. *collision.joe: [[JOE format]], collision box geometry. Note that as of R2396, this file is no longer required. *engine.wav: WAVE format, engine sound at 7000 RPM. *glass.joe: [[JOE format]], geometry data for any glass elements from the car body (such as windows). *glass.png: PNG format, the glass.joe UV texture. Texture transparency is supported. *interior.joe: [[JOE format]], geometry data for the car's interior. *interior.png: PNG format, the interior.joe UV texture. *oem_wheel.joe: [[JOE format]], geometry data to be used for the wheels. *oem_wheel.png: PNG format, the oem_wheel.joe UV texture. *reverse.png: PNG format, an additive texture using the body.joe UV texture containing reverse lights. [[Category:Cars]] 1a04dc9d41f97d8b20a71634a11a8c9686a714a4 Main Page 0 1 1294 1238 2013-04-04T15:37:37Z NaN 4 /* VDrift Wiki */ wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General|General]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]] *[[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[Car sounds]] *[[3D modeling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} 954b5b8b835b35533cf499a7e0ca9b1bb5fddb4d 1304 1294 2013-04-05T10:02:25Z NaN 4 /* VDrift Wiki */ wikitext text/x-wiki [[File:VDrift_logo.png]] ='''VDrift Wiki'''= Welcome to the [[Project:About|VDrift Wiki]]. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:General|General]]''' *[[About the project]] *[[Authors and contributors]] *[[License]] *[[Reporting problems]] *[[Useful links]] |width="250px"|'''[[:Category:Installation|Installation]]''' *[[Requirements]] *[[Downloading]] *[[Installing]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Configuration|Configuration]]''' *[[Configuring the display]] *[[Configuring the sound]] *[[Configuring the controls]] *[[Logitech G25 support]] *[[Setting up force feedback]] |width="250px"|'''[[:Category:Playing|Playing]]''' *[[Replays]] *[[Drifting techniques]] *[[Drift scoring]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Files|Files]]''' *[[User settings directory]] *[[Data directory]] *[[VDrift.config]] *[[Adding video modes]] *[[options.config]] *[[Sound/graphics formats]] *[[JOE format]] *[[JOEPack format]] *[[Configfile format]] *[[Menu system|Menu file format]] |width="250px"|'''[[:Category:Development|Development]]''' *[[Getting the development version]] *[[Working with the development version]] *[[Compiling]] *[[Packaging]] *[[Testing]] *[[Debugging]] *[[Coding guidelines]] *[[Source code documentation]] *[[Numerical Integration]] |} {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''[[:Category:Cars|Cars]]''' *[[Getting cars]] *[[Car files and formats]] *[[Creating cars]] *[[Car parameters]] *[[Car graphics]] *[[Car sounds]] *[[3D modeling]] |width="250px"|'''[[:Category:Tracks|Tracks]]''' *[[Getting tracks]] *[[Track files and formats]] *[[Creating tracks]] *[[Importing Racer tracks]] |} 7d11c4c09285aa3f69d45e7f363f8dd523706845 Car sounds 0 130 1295 2013-04-04T16:12:27Z NaN 4 Created page with "==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver..." wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default configuration is a single sound. * engine.wav - Engine sound at 7000rpm ===Advanced engine sound setup=== VDrift supports multiple engine sounds with interpolation(blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=off # optional, use this sound for throttle open(on) or closed(off); default is both [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 8661a14b6a8c74633591fbb80de2b4f8fd7f5c3c 1296 1295 2013-04-04T16:22:03Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ===Advanced engine sound setup=== VDrift supports multiple engine sounds with interpolation(blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_15.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should overlap) to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 67301dfa24f91c42716a8a1dfb8d2824a34ba9f2 1297 1296 2013-04-04T16:24:39Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ===Advanced engine sound setup=== VDrift supports multiple engine sounds with interpolation(blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_15.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. ====Example TL2/TL2.aud==== <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] ec330c04ee3858f72ed4b78cf7fef63696d1ff0d 1298 1297 2013-04-04T16:25:30Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation(blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_15.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 6c95b0b2bfd07ea65d10210502743bd3cf30ec32 1299 1298 2013-04-04T16:26:27Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_15.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 6a0f0432f3401a951859cc9323d98f2a38387670 1300 1299 2013-04-04T16:27:19Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_15.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] db66b494587927ccfdc3bc2b1e9298d4404892c8 1301 1300 2013-04-04T16:30:26Z NaN 4 /* Advanced engine sound setup */ wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_1.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 09ed3107529163b1325086c348e358a117fc8bf7 1302 1301 2013-04-04T16:31:19Z NaN 4 /* Advanced engine sound setup */ wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_1.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 306b75380b7886cd504f8b7939eb2a2923902690 1303 1302 2013-04-04T16:31:38Z NaN 4 /* Advanced engine sound setup */ wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav - Brake engage sound (in driver view) bump_front.wav - Front suspension bump sound bump_rear.wav - Rear suspension bump sound crash.wav - Collision sound gear.wav - Gear shift sound (in driver view) grass.wav - Tires rolling over grass gravel.wav - Tires rolling over gravel handbrake.wav - Handbrake engage sound (in driver view) tire_squeal.wav - Tire squeal(skidding over asphalt) sound </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav - Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_1.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm to use this sound for NaturalRPM=1000 # rpm this sound has been recorded at power=on # optional, use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 14b04dd3ae5aa55fcfc8af18cfa4d390710c3ac2 1309 1303 2013-04-05T15:42:44Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav # Brake engage sound (in driver view) handbrake.wav # Handbrake engage sound (in driver view) gear.wav # Gear shift sound (in driver view) bump_front.wav # Front suspension bump sound bump_rear.wav # Rear suspension bump sound crash.wav # Collision sound grass.wav # Tires rolling over grass gravel.wav # Tires rolling over gravel tire_squeal.wav # Tire squeal(skidding over asphalt) sound wind.ogg # Wind noise </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav # Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_1.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm to use this sound for NaturalRPM=1000 # rpm this sound has been recorded at power=on # (optional) use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 11e3a555f8c682b3502a6dd3386646ff787dac10 1310 1309 2013-04-05T15:43:16Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav # Brake engage sound (in driver view) handbrake.wav # Handbrake engage sound (in driver view) gear.wav # Gear shift sound (in driver view) bump_front.wav # Front suspension bump sound bump_rear.wav # Rear suspension bump sound crash.wav # Collision sound grass.wav # Tires rolling over grass gravel.wav # Tires rolling over gravel tire_squeal.wav # Tire squeal(skidding over asphalt) sound wind.ogg # Wind noise </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav # Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_1.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm to use this sound for NaturalRPM=1000 # rpm this sound has been recorded at power=on # (optional) use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 8a7f9a64b44d4d9401dbcb61696118a00f2db8b1 1311 1310 2013-04-05T15:58:37Z NaN 4 wikitext text/x-wiki ==Shared sounds== VDrift has a number of sounds that are used for all cars. They can be found in the carparts directory. <pre> brake.wav # Brake engage sound (in driver view) handbrake.wav # Handbrake engage sound (in driver view) gear.wav # Gear shift sound (in driver view) bump_front.wav # Front suspension bump sound bump_rear.wav # Rear suspension bump sound crash.wav # Collision sound grass.wav # Tires rolling over grass gravel.wav # Tires rolling over gravel tire_squeal.wav # Tire squeal(skidding over asphalt) sound wind.ogg # Wind noise </pre> ==Individual sounds== Car engine sounds are stored per car. Default minimum configuration is a single sound. <pre> engine.wav # Engine sound at 7000rpm </pre> ====Advanced engine sound setup==== VDrift supports multiple engine sounds with interpolation (blending). To use this feature a <CARNAME>.aud text file has to be created containing sound information. It can contain an arbitrary number of sections, one per sound file. <pre> [sound1] filename=engine_accel_1.wav # relative path to the sound file MinimumRPM=1 # minimum engine rpm to use this sound for MaximumRPM=1500 # maximum engine rpm to use this sound for NaturalRPM=1000 # rpm this sound has been recorded at power=on # (optional) use this sound for throttle open(on) or closed(off); default is both </pre> The rpm ranges of two neighboring sounds can(should) overlap to create a smooth transition. Example TL2/TL2.aud: <pre> [poweroff1] filename=sounds/1kbehind.wav MinimumRPM=1 MaximumRPM=1500 NaturalRPM=1000 power=off [poweron1] filename=sounds/2kbehind.wav MinimumRPM=1 MaximumRPM=2500 NaturalRPM=2000 power=on [poweroff2] filename=sounds/5kbehind.wav MinimumRPM=1000 NaturalRPM=4650 MaximumRPM=4500 power=off [poweron2] filename=sounds/4kbehind.wav MinimumRPM=2000 NaturalRPM=3560 MaximumRPM=4000 power=on [poweroff3] filename=sounds/6kbehind.wav MinimumRPM=4000 NaturalRPM=5130 MaximumRPM=10000 power=off [poweron3] filename=sounds/7kbehind.wav MinimumRPM=3500 NaturalRPM=6130 MaximumRPM=10000 power=on </pre> [[Category:Cars]] [[Category:Files]] 897db51eec533380178a70f4c110990f8e09081e Car graphics 0 131 1305 2013-04-05T10:34:18Z NaN 4 Created page with "Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to ..." wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== todo ====Generated Geometry==== todo ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== todo ====Car Skins==== todo 3ed6ab0bce69eaf30adab2628ca7b479bc3f1267 1306 1305 2013-04-05T10:34:43Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== todo ====Generated Geometry==== todo ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== todo ====Car Skins==== todo 3292c6c16bad5d441d9628c2c74014e6d1281111 1307 1306 2013-04-05T10:50:39Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) surface texture; the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== todo ====Generated Geometry==== todo ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== todo ====Car Skins==== todo [[Category:Cars]] 98c011f4893c0fea29115013821d8a1be6bbfc48 1308 1307 2013-04-05T10:54:21Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== todo ====Generated Geometry==== todo ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== todo ====Car Skins==== todo [[Category:Cars]] ceaec9c96462e9b8dfb30a2f73d60d35cf188715 1312 1308 2013-04-05T16:00:27Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== todo ====Generated Geometry==== todo ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== todo ====Car Skins==== The diffuse texture of the car [body] can be swapped by the player against textures in <CARNAME>/skins directory. [[Category:Cars]] 8703e16d636c625f9aaf2b1b084ae5ac26a0bb97 1313 1312 2013-04-05T16:00:58Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== todo ====Generated Geometry==== todo ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== todo ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures in <CARNAME>/skins directory. [[Category:Cars]] 7bdf7b130af31d2ec4631be451d9ae7e6569230c 1314 1313 2013-04-05T16:01:29Z NaN 4 /* Car Skins */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== todo ====Generated Geometry==== todo ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== todo ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 5f54636e5b9dae72d75269d53c33b69b1ef4b6c4 1315 1314 2013-04-05T16:20:31Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car [wheel.<id>.brake] and [wheel.<id>.tire] (id = [fl, fr, rl, rr]) components will be auto-generated by the game when no mesh is provided. Their dimensions are derived from the provided brake and tire data. The mesh of the [wheel.<id>] component contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the wheel component the optional property genrim has to be set to false. <pre> [wheel.fl] texture = my_wheel_texture.png mesh = my_wheel_with_rim.joe genrim = false </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 01e3ee576d9b8b351d54d847dee9883220638c7f Creating cars 0 25 1316 1263 2013-04-05T16:28:56Z NaN 4 wikitext text/x-wiki {{note|The information provided here is outdated. Please refer to [[Car graphics]], [[Car parameters]], [[Car sounds]] for up to date information.}} This article gives a rough idea of what it takes to create a car for VDrift. ==Get the Art Tools== Download the [https://github.com/VDrift/blender-scripts Blender export scripts] from [[Getting the development version|GitHub]]. ==Create Models== You will need to create 3D models using Blender for the car's body, the glass pieces, and the wheels. Each different model must be a separate Blender object and each must have a separate texture. Models must be entirely made of triangles. Units of the models are in meters. ===Coordinate Systems=== See [[Coordinate systems]] ===Shading and Smoothing=== Faces (and perhaps individual vertices) can be set to smooth or solid shading, and that will get exported in the joe file. The best way to do smoothing is to select all of the faces, set solid, and then select groups that should be blended together and do set smooth individually. That makes it so that smooth parts that intersect in a hard edge have correct normals. Don't use any double-sided faces. ===Body Model=== In the model pack you will find a Blender file "test.blend". This is the default car model. The glass is one object and the rest of the car is one object. This allows you to export the glass as a "glass.joe" file and the rest of the car as a "body.joe" file. The car should be in the neighborhood of 3500 faces (car and windows combined), although less is of course possible and more is probably also acceptable. The body can be placed anywhere, although by convention the body is usually placed so that the center of the model is near the origin. ===Interior Model=== The interior model should fit inside the body model to provide the inside of the car. This is a separate model so it can appear flat instead of shiny like the painted exterior. The interior model should share the center point or object handle of the body model so they fit together perfectly without being translated. ===Wheel Model=== The file "wheel.blend" is the default wheel model. Try to keep your wheel model under 1000 faces. The wheel model must be centered at the origin. ==Texture the Models== A single UV map can be used per object for texturing. The .png files are the textures for each associated .joe model. The textures must be 512x512 24- or 32-bit PNG images. Their names should be the same as the model they coordinate with except for the .png extension at the end. For example, the texture for the model "body.joe" must be named "body.png". ===Brake lights=== Add a texture "brake.png" that is the same as the body graphic, but the brake lights are now on and the rest of the file is black. This should be a 24-bit png file (no alpha channel). ==Export the Models== Using the Python scripts ("export-joe-0.3.py" and "export-all-joe-0.3.py") you can export objects modeled in Blender to JOE format. The mesh needs to be all triangles before export. The currently selected object is exported. Object level transformations are not exported, so make sure any rotation or moving or scaling is done in edit mode, not object mode. You can actually position the car wherever you want, but all of your positioning must match up with the values in the car's .car file. The default exporter setting of 1 frame is what you should use. The export-all script exports all the objects to files based on the objects' names. ==About file== Write a short text file about your car. This goes in the about.txt file. This information is displayed in the car selection menu. Please include information such as authorship and license. See the other cars for examples. ==Car Definition File== Finally you must write car definition file, which contains all of the [[car parameters]]. You can start by copying tools/cars/blank.car and entering values to fit your vehicle. Try to find accurate information regarding the specifications of the car and duplicate it as closely as possible. The units are all in [http://scienceworld.wolfram.com/physics/MKS.html MKS] (meters, kilograms, seconds). It might also help to read [http://www.miata.net/sport/Physics/ ''The Physics of Racing''] by Brian Beckman. Needless to say, it requires a lot of knowledge to create a car definition file from scratch so it is suggested that you try using values from other cars. Many of the [http://www.racer-xtreme.com/ community-made cars for Racer] have very similar values that can be used for VDrift. ==Locations== All the files needed for a car go into the directory '''data/cars/car_name/''', where ''car_name'' is the short name of the car. ==Need Help?== Try the related wiki articles on [[car files and formats]], [[car parameters]], or the [[car modeling tutorial]]. If you get stuck, feel free to ask questions in our [http://vdrift.net/Forum/viewforum.php?f=1 VDrift.net Help forum] or on [http://vdrift.net/staticpages/index.php?page=irc-chat VDrift IRC] ==Contribute== Once you create a new car please contribute it back to the game so that others can enjoy it. The best way to do this is to start a thread in our [http://vdrift.net/Forum/viewforum.php?f=5 Development forum] or to create an account on [http://cars.vdrift.net cars.vdrift.net] and upload it there. [[Category:Cars]] 7f72a871b8a0d8a03b634018d0ad538a10c7793b Car graphics 0 131 1317 1315 2013-04-05T16:37:30Z NaN 4 /* Generated Geometry */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (id = [fl, fr, rl, rr]) will be auto-generated by the game when no mesh is provided. Their dimensions are derived from the provided brake and tire data. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the wheel component the optional property genrim has to be set to false. <pre>[wheel.fl] texture = my_wheel_texture.png mesh = my_wheel_with_rim.joe genrim = false</pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] acf0c805d1f37f8facc13672aa2315242be98177 1318 1317 2013-04-05T16:38:01Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (id = [fl, fr, rl, rr]) will be auto-generated by the game when no mesh is provided. The dimensions are derived from the provided brake and tire data. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the wheel component the optional property genrim has to be set to false. <pre>[wheel.fl] texture = my_wheel_texture.png mesh = my_wheel_with_rim.joe genrim = false</pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 153392c81888896a8423ebb9b2546a85eebeafc3 1319 1318 2013-04-05T16:40:31Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (id = [fl, fr, rl, rr]) will be auto-generated by the game when no mesh is provided. The dimensions are derived from the provided brake and tire data. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the wheel component the optional property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false</pre> # (optional) disable auto-generated wheel rim and scaling ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 3b0a5cbf9eeda9916ab787c8acd20a1a4364c1fa 1320 1319 2013-04-05T16:41:21Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (id = [fl, fr, rl, rr]) will be auto-generated by the game when no mesh is provided. The dimensions are derived from the provided brake and tire data. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the wheel component the optional property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) disable auto-generated wheel rim and scaling </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 26f61e865e310ec85632c3160032e80ca7372b08 1321 1320 2013-04-05T16:42:36Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (id = [fl, fr, rl, rr]) will be auto-generated by the game when no mesh is provided. The dimensions are derived from the provided brake and tire data. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the wheel component the optional property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 967eb62bad2b7ce3e1e6ffa2f001b27354dbff61 1322 1321 2013-04-05T16:46:12Z NaN 4 /* Generated Geometry */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (id = [fl, fr, rl, rr]) will be auto-generated by the game when no mesh is provided. The dimensions are derived from the provided tire parameters. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the wheel component the optional property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 57f6dea8b7ae50d13761c2929b05d4ea8f3f1a7f 1323 1322 2013-04-05T16:48:56Z NaN 4 wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (id = [fl, fr, rl, rr]) will be auto-generated by the game when no mesh is provided. The dimensions are derived from the provided tire parameters. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] afd7d044c7e5a9ac65cea2e9f76c95d1056a2d64 1324 1323 2013-04-05T16:50:12Z NaN 4 /* Generated Geometry */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (with id = {fl, fr, rl, rr}) will be auto-generated by the game when no mesh is provided. The dimensions are derived from the provided tire parameters. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated by the game from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated by the game from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] aaf8d56df0132a6885aa545cc0121718187e8eb7 1325 1324 2013-04-06T18:28:43Z NaN 4 /* Generated Geometry */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (with id = {fl, fr, rl, rr}) will be auto-generated when no mesh is provided. The dimensions are derived from the provided tire parameters. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Analogous to tires, car brake geometry [wheel.<id>.brake] will be auto-generated from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 7b0649ae82ffaaec96adcb5665068e3eae7ea0ba 1326 1325 2013-04-06T18:29:12Z NaN 4 /* Generated Geometry */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (with id = {fl, fr, rl, rr}) will be auto-generated when no mesh is provided. The dimensions are derived from the provided tire parameters. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Car brake geometry [wheel.<id>.brake] will be auto-generated from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== Analogous to geometry loading, when loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] e779892e2ea7d545e9a7d482a6fa490bb809fb1d 1327 1326 2013-04-06T18:29:47Z NaN 4 /* Shared Textures */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (with id = {fl, fr, rl, rr}) will be auto-generated when no mesh is provided. The dimensions are derived from the provided tire parameters. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Car brake geometry [wheel.<id>.brake] will be auto-generated from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== When loading a texture VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 51604131e507ab8be63293e4a18ba0a2d021d774 1328 1327 2013-04-06T18:30:23Z NaN 4 /* Shared Textures */ wikitext text/x-wiki Cars in VDrift are composed of multiple components. Their graphical representation consists of geometry(mesh), textures and a draw flag which denotes whether the object is to be handled as opaque, transparent or emissive. The setup is done in [[car parameters]] files <CARNAME>.car. Geometry(meshes) can share textures. The number of meshes and textures should be kept low for performance reasons. Example of a graphical component setup: <pre> [some_car_part] texture = diffuse.png, misc1.png, misc2.png # (required) the first texture(diffuse.png) is required, additional textures(misc1.png, misc2.png)are optional mesh = model.joe # (required) geometry (mesh) position = 0.736, 1.14, -0.47 # (optional) relative mesh position rotation = 0, 0, 30 # (optional) relative mesh orientation scale = -1, 1, 1 # (optional) mesh scale factor color = 0.8, 0.1, 0.1 # (optional) base diffuse color; blended with diffuse texture using alpha channel as mask draw = transparent # (optional) draw flag: opaque, transparent, emissive; opaque is default </pre> ==Geometry== Car geometry is stored in VDrift native [[JOE format]]. Import/export scripts for [http://www.blender.org Blender] are available here: https://github.com/VDrift/blender-scripts ====Shared Geometry==== When loading a mesh VDrift first checks cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. The assets in this directory are shared, can be used by all cars. ====Generated Geometry==== Car tire geometry [wheel.<id>.tire] (with id = {fl, fr, rl, rr}) will be auto-generated when no mesh is provided. The dimensions are derived from the provided tire parameters. <pre>[wheel.fl.tire] texture = tire.png # (optional) enables auto-generated tire mesh mesh = tire.joe # (optional) overrides auto-generated tire mesh </pre> Car brake geometry [wheel.<id>.brake] will be auto-generated from brake dimensions when no mesh is provided. <pre> [wheel.fl.brake] texture = brake_disk.png # (optional) enables auto-generated disk mesh mesh = brake_disk.joe # (optional) overrides auto-generated brake disk mesh </pre> Car wheel [wheel.<id>] mesh contains only the wheel disc at unit size (0.5 m radius). The rim is auto-generated from tire dimensions. The disk mesh is scaled to fit it. To be able to use a custom wheel mesh (which already has a rim) the property genrim has to be set to false. <pre>[wheel.fl] texture = wheel.png # (required) wheel (disk + rim) diffuse texture mesh = wheel.joe # (required) wheel disk mesh; if genrim=false wheel mesh with rim genrim = false # (optional) enable auto-generated wheel rim and scaling; default true </pre> ==Textures== VDrift supports multi-texturing for more realistic geometry surface graphics. Texture are RGBA images in PNG format. As of April 2013 DDS(DXT1-3) is also supported. * 1. Texture (required): Diffuse color (diffuse albedo or diffuse reflectance) in the RGB channels and Color Blending mask in the A channel. * 2. Texture (optional): Specular reflection (fresnel reflection coeff at 0 deg) in the RGB channels and Glossiness (surface roughness) in the A channel. * 3. Texture (optional): Normal map (tangent space normals) in the RGB channels. ====Shared Textures==== When loading a texture VDrift first looks for it in cars/<CARNAME> directory and then falls back to the carparts (and trackparts) directory. ====Car Skins==== The diffuse texture of the car [body] component can be swapped by the player against textures placed in <CARNAME>/skins directory. [[Category:Cars]] 37efd08e61bdbc4e91e001e86ae369b864a6ee13 Creating tracks 0 26 1329 1258 2014-12-24T22:42:21Z Timo 6 3 /* Directions for creating tracks */ Fix formatting wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * VDrift * VDrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: https://github.com/VDrift/blender-scripts Get the '''export-all-joe-0.3.py''' script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: git clone https://github.com/VDrift/trackeditor vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See [[3D modeling]] for resources to help with this step. * If you use a 3D editor other than blender, import the track into blender. * Use the '''export-all-joe-0.3.py''' blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of '''.joe''' files and a '''list.txt''' file. The '''list.txt''' file may be named '''somename-list.txt''', in which case you should rename it to '''list.txt'''. At least one '''.joe''' file should get created for the curve track. Also verify that '''list.txt''' is mentioning all the '''.joe''' files. An empty '''list.txt''' will not load anything in the editor. * Create new folder for track in track editor folder ''TRACKEDITOR_TP'' (if your track is called parkinglot, the path could be '''/home/joe/trackeditor/data/tracks/parkinglot'''). * Make folder '''''TRACKEDITOR_TP''/objects/''' * Copy all of the '''.joe''' files and the '''list.txt''' file to '''''TRACKEDITOR_TP''/objects/''' * Open track editor '''data/tracks/editor.config''' and set active track to ''TRACKEDITOR_TP''. * Create a '''''TRACKEDITOR_TP''/track.txt''' file with at least a line "cull faces = on". '''track.txt''' is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * <code>cd</code> to the '''trackeditor/joepack''' folder. Compile the joepack tool by running scons * <code>cd</code> to the '''''TRACKEDITOR_TP''/objects''' folder (this is important, the packfile stores relative paths) and run /path/to/trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy ''TRACKEDITOR_TP'' into the main VDrift tracks folder ''VDRIFT_TP'' (for example '''/home/joe/vdrift/data/tracks/parkinglot'''). Erase '''''VDRIFT_TP''/objects/*.joe''' since they are all in the pack file now. * Add '''''VDRIFT_TP''/about.txt''' and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to '''''VDRIFT_TP''/trackshot.png''' * Open up all of the texture files in '''''TRACKEDITOR_TP''/objects''' and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the '''trackeditor/listedit''' tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within VDrift. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in '''track.txt''' if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] 1a4c74f8909409e68f8b85a816275ba82f7776f9 1330 1329 2014-12-24T22:51:09Z Timo 6 3 /* Other Notes */ Fix tab instead of space wikitext text/x-wiki ==Video Tutorial== NaN has produced this nifty video tutorial (Windows, but mostly applicable to Linux too): http://www.youtube.com/watch?v=oju-vKVVaho ==What you need== * VDrift * VDrift level editor * Blender 2.33 or higher. Tested on 2.45 with Python 2.5.1 * Blender JOE export script. Get that here: https://github.com/VDrift/blender-scripts Get the '''export-all-joe-0.3.py''' script. The difference in the files is that one exports all the object in the scene and the other only exports the one that is selected. ==Getting the level editor== In the Linux console, copy ''everything'' below: git clone https://github.com/VDrift/trackeditor vdrift-trackeditor ==Directions for creating tracks== * Model the scene. See [[3D modeling]] for resources to help with this step. * If you use a 3D editor other than blender, import the track into blender. * Use the '''export-all-joe-0.3.py''' blender export script to export all objects. This script can be found in the VDrift art repository under the tools folder. The export script creates a number of '''.joe''' files and a '''list.txt''' file. The '''list.txt''' file may be named '''somename-list.txt''', in which case you should rename it to '''list.txt'''. At least one '''.joe''' file should get created for the curve track. Also verify that '''list.txt''' is mentioning all the '''.joe''' files. An empty '''list.txt''' will not load anything in the editor. * Create new folder for track in track editor folder ''TRACKEDITOR_TP'' (if your track is called parkinglot, the path could be '''/home/joe/trackeditor/data/tracks/parkinglot'''). * Make folder '''''TRACKEDITOR_TP''/objects/''' * Copy all of the '''.joe''' files and the '''list.txt''' file to '''''TRACKEDITOR_TP''/objects/''' * Open track editor '''data/tracks/editor.config''' and set active track to ''TRACKEDITOR_TP''. * Create a '''''TRACKEDITOR_TP''/track.txt''' file with at least a line "cull faces = on". '''track.txt''' is modified by track editor to add all starting positions and lap sequence points. Read the track editor inhelp for more information. * Run the track editor. Trace the roadways and mark the starting position (press H for help). A track may not always appear on the screen. Move the mouse around and you could see it in the black space. The first time, check the console output of track editor for any warnings. {| style="border: solid 1px black; background-color: #e0e0e0" |- valign="top" |width="250px"|'''Why trace roadways?''' [[Image:Track-smoothing.png]] This is a visual depiction of the track smoothing that occurs when tracing a roadway. Imagine this image is showing the track surface from a side view. The black lines represent the track mesh, and the red lines represent the bezier patches. Once the track has been traced in the track editor, VDrift will use the red lines to do collision instead of the black lines. On the top, this represents a dip in the road. You can see how collision using the red line will behave properly. On the bottom, this represents a bump road. You can see that the red line doesn't change the magnitude of the bumps, it just makes them realistically smooth instead of unrealistically pointy. |} * <code>cd</code> to the '''trackeditor/joepack''' folder. Compile the joepack tool by running scons * <code>cd</code> to the '''''TRACKEDITOR_TP''/objects''' folder (this is important, the packfile stores relative paths) and run /path/to/trackeditor/joepack/joepack -c objects.jpk *.joe * If you want, this command will show you the files in the joepack to allow you to verify the previous step worked correctly: /path/to/VDrift-trackeditor/joepack/joepack -l objects.jpk * Copy ''TRACKEDITOR_TP'' into the main VDrift tracks folder ''VDRIFT_TP'' (for example '''/home/joe/vdrift/data/tracks/parkinglot'''). Erase '''''VDRIFT_TP''/objects/*.joe''' since they are all in the pack file now. * Add '''''VDRIFT_TP''/about.txt''' and ensure that the first line is the name of the track. You should put information about the track author, where the track came from, etc in the second line and on. * Run VDrift and check out what the track looks like in-game. Note that you will only be able to drive on the roadways you defined in the track editor since no other surfaces have been flagged as collideable. Also take a screenshot for the track selection screen. * Create a track selection image (a 512x512 png file works best) and save it to '''''VDRIFT_TP''/trackshot.png''' * Open up all of the texture files in '''''TRACKEDITOR_TP''/objects''' and review which textures belong to objects that should be collide-able (roads and walls), have full brightness (trees), be mipmapped (fences and fine transparent objects sometimes look better when not mipmapped), or be skyboxes. * Set the correct object properties using the '''trackeditor/listedit''' tool (more documentation to come). * Done! ==Other Notes== * A track should be of a minimum size for loading within VDrift. If the editor is not allowing to adjust the camera poistions correctly, probably the track is very small. Scale everything in the blender twice or more and try again. * Starting points are set within the track editor. After the track is loaded, position the track like you were in the car on the track i.e. first person view. Press L to save the position as a starting position. Continue to add positions depending on your track. Also add a lap sequence i.e. lap starting/ending point track. * Track editor does not paint or mark the starting points or lap sequence numbers on the track. These are only saved in track.txt. Also, the editor will always continue adding more starting positions if track.txt had some already. Therefore, consider deleting everything in '''track.txt''' if you wish to reedit the positions. * A .joe file gets created when the track has a texture. * The export-joe script should be loaded within blender along with the track, and executed. [[Category:Tracks]] 3249e65dae78d58085608db43836136cb1d813e4 Compiling 0 15 1331 1150 2015-06-02T15:27:19Z NaN 4 /* Building with Code::Blocks/MinGW */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC=== * Run the appropriate command from the '''vdrift''' folder to generate the build files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 ===Building with Scons(broken)=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH environment variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4]. * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20]. * Run the installer. It should find your Python installation, accept all defaults. * Your PATH environment variable should contain the Python and Python scripts paths (e.g. C:\Python26;C:\Python26\Scripts;). * Run the following command from within the '''vdrift''' folder: tools/win/bin/build_vdrift.bat </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://www.boost.org/ Boost C++ Libraries] (header-file-only) * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.78). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://glew.sourceforge.net/ GLEW] - OpenGL Extension Wrangler Library (minimum version 1.5.7) * [http://libarchive.github.com/ libarchive] - Multi-format archive and compression library (minimum version 2.8.3) * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * vorbisfile - File loading library for the ogg vorbis format * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 1.2.14) * [http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx SDL_gfx] - Graphics drawing primitives library (minimum version 2.0.16) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 1.2.10) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ glew-devel libarchive-devel scons SDL_*-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] 76b2fde0c8f8c8259718a0f6d0516bdd97394fb1 1332 1331 2015-06-02T15:27:50Z NaN 4 /* Building with MSVC */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC (obsolete)=== * Run the appropriate command from the '''vdrift''' folder to generate the build files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 ===Building with Scons(broken)=== {{note|SCons will prefer the MSVC tools over the MinGW. So if you have Microsoft Visual Studio installed, you might have problems building VDrift with Scons.}} * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH environment variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://www.python.org/ftp/python/2.6.4/python-2.6.4.msi Python 2.6.4]. * Run the installer and accept all the defaults. * Download [http://www.scons.org/ SCons 1.20]. * Run the installer. It should find your Python installation, accept all defaults. * Your PATH environment variable should contain the Python and Python scripts paths (e.g. C:\Python26;C:\Python26\Scripts;). * Run the following command from within the '''vdrift''' folder: tools/win/bin/build_vdrift.bat </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://www.boost.org/ Boost C++ Libraries] (header-file-only) * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.78). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://glew.sourceforge.net/ GLEW] - OpenGL Extension Wrangler Library (minimum version 1.5.7) * [http://libarchive.github.com/ libarchive] - Multi-format archive and compression library (minimum version 2.8.3) * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * vorbisfile - File loading library for the ogg vorbis format * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 1.2.14) * [http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx SDL_gfx] - Graphics drawing primitives library (minimum version 2.0.16) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 1.2.10) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ glew-devel libarchive-devel scons SDL_*-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] 2912eade5f09bfaff9494cc09cc74348eef3610d 1333 1332 2015-06-02T15:40:27Z NaN 4 /* Windows */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with MSYS2=== * This is the recommended method to build VDrift. It does not require vdrift-win. * Install [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2] and update local packages. * Install build tools. pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf scons * Install VDrift dependencies. pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-bullet mingw-w64-x86_64-curl mingw-w64-x86_64-libvorbis * Build VDrift using MinGW-w64 Win64 Shell. scons * For more build options run scons --help ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC (obsolete)=== * Run the appropriate command from the '''vdrift''' folder to generate the project files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://www.boost.org/ Boost C++ Libraries] (header-file-only) * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.78). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://glew.sourceforge.net/ GLEW] - OpenGL Extension Wrangler Library (minimum version 1.5.7) * [http://libarchive.github.com/ libarchive] - Multi-format archive and compression library (minimum version 2.8.3) * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * vorbisfile - File loading library for the ogg vorbis format * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 1.2.14) * [http://www.ferzkopp.net/joomla/software-mainmenu-14/4-ferzkopps-linux-software/19-sdlgfx SDL_gfx] - Graphics drawing primitives library (minimum version 2.0.16) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 1.2.10) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ glew-devel libarchive-devel scons SDL_*-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] 3c81c40c6967c10122ce418d0585fd46b813af4d 1335 1333 2015-06-24T18:52:53Z NaN 4 /* Prerequisites */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with MSYS2=== * This is the recommended method to build VDrift. It does not require vdrift-win. * Install [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2] and update local packages. * Install build tools. pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf scons * Install VDrift dependencies. pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-bullet mingw-w64-x86_64-curl mingw-w64-x86_64-libvorbis * Build VDrift using MinGW-w64 Win64 Shell. scons * For more build options run scons --help ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC (obsolete)=== * Run the appropriate command from the '''vdrift''' folder to generate the project files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://www.boost.org/ Boost C++ Libraries] (header-file-only) * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.83). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * vorbisfile - File loading library for the ogg vorbis format * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 2.0.0) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 1.2.10) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ glew-devel libarchive-devel scons SDL_*-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] 03533904ca48ba78ba0d33f5143cd8fec8147f53 1336 1335 2015-06-24T19:00:35Z NaN 4 /* Prerequisites */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with MSYS2=== * This is the recommended method to build VDrift. It does not require vdrift-win. * Install [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2] and update local packages. * Install build tools. pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf scons * Install VDrift dependencies. pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-bullet mingw-w64-x86_64-curl mingw-w64-x86_64-libvorbis * Build VDrift using MinGW-w64 Win64 Shell. scons * For more build options run scons --help ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC (obsolete)=== * Run the appropriate command from the '''vdrift''' folder to generate the project files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.83). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * vorbisfile - File loading library for the ogg vorbis format * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 2.0.0) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 2.0.0) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ glew-devel libarchive-devel scons SDL_*-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] b583817a36e34c9f27a0a71e6cb5c266cdc4e75a 1337 1336 2015-06-24T19:18:47Z NaN 4 /* Fedora */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with MSYS2=== * This is the recommended method to build VDrift. It does not require vdrift-win. * Install [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2] and update local packages. * Install build tools. pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf scons * Install VDrift dependencies. pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-bullet mingw-w64-x86_64-curl mingw-w64-x86_64-libvorbis * Build VDrift using MinGW-w64 Win64 Shell. scons * For more build options run scons --help ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC (obsolete)=== * Run the appropriate command from the '''vdrift''' folder to generate the project files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.83). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * vorbisfile - File loading library for the ogg vorbis format * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 2.0.0) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 2.0.0) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ libvorbis-devel scons SDL2-devel SDL2_image-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] ed84df1bd53bab34a2544ec1d93fb8c393cff5ab 1338 1337 2015-06-24T19:19:32Z NaN 4 /* Prerequisites */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with MSYS2=== * This is the recommended method to build VDrift. It does not require vdrift-win. * Install [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2] and update local packages. * Install build tools. pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf scons * Install VDrift dependencies. pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-bullet mingw-w64-x86_64-curl mingw-w64-x86_64-libvorbis * Build VDrift using MinGW-w64 Win64 Shell. scons * For more build options run scons --help ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC (obsolete)=== * Run the appropriate command from the '''vdrift''' folder to generate the project files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.83). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 2.0.0) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 2.0.0) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ libvorbis-devel scons SDL2-devel SDL2_image-devel curl-devel ====Ubuntu==== Ubuntu does not include a libbullet package, but getdeb does. To add the getdeb-repository to your sources-list.d: wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add - sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu natty-getdeb games" > /etc/apt/sources.list.d/getdeb.list' sudo apt-get update Ubuntu 11.04 (Natty Narwhal) does contain libglew1.5, only. To install libglew1.6 and its development headers: wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6_1.6.0-3_amd64.deb rm libglew1.6_1.6.0-3_amd64.deb wget http://archive.ubuntu.com/ubuntu/pool/universe/g/glew/libglew1.6-dev_1.6.0-3_amd64.deb sudo dpkg -i libglew1.6-dev_1.6.0-3_amd64.deb rm libglew1.6-dev_1.6.0-3_amd64.deb All other required packages can be installed using this command: sudo apt-get install g++ libarchive-dev libcurl4-gnutls-dev \ libdrm-dev libgl1-mesa-dev \ libglu1-mesa-dev libkms1 mesa-common-dev \ libsdl-gfx1.2-dev libsdl-image1.2-dev \ libsdl-net1.2-dev libvorbis-dev freeglut3 libbullet0 \ libbullet-dev scons ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] 1dc2907ab8aa2b7e633cfddd847e6d80af8e2941 1339 1338 2015-06-24T19:22:03Z NaN 4 /* Ubuntu */ wikitext text/x-wiki This page shows how to compile VDrift from source. It assumes you have downloaded the source code either by getting the source package from the [[Downloading|latest release]], or by [[Getting the development version|getting the development version]]. __TOC__ <div class="mw-collapsible mw-collapsed"> ==Windows== <div class="mw-collapsible-content"> ===Building with MSYS2=== * This is the recommended method to build VDrift. It does not require vdrift-win. * Install [http://sourceforge.net/p/msys2/wiki/MSYS2%20installation/ MSYS2] and update local packages. * Install build tools. pacman -S mingw-w64-x86_64-gcc mingw-w64-x86_64-pkgconf scons * Install VDrift dependencies. pacman -S mingw-w64-x86_64-SDL2 mingw-w64-x86_64-SDL2_image mingw-w64-x86_64-bullet mingw-w64-x86_64-curl mingw-w64-x86_64-libvorbis * Build VDrift using MinGW-w64 Win64 Shell. scons * For more build options run scons --help ===Building with Code::Blocks/MinGW (obsolete)=== * Download the [http://sourceforge.net/projects/mingw/files/ latest MinGW]. When asked to select components for install, you only need the base system and the g++ compiler. * Your PATH Environment Variable should contain the MinGW bin path (e.g. C:\MinGW\bin;). * Download [http://forums.codeblocks.org/index.php/board,20.0.html Code::Blocks nightly] * Run the following command from the '''vdrift''' folder to generate the build files. vdrift-win\premake4 codeblocks ===Building with MSVC (obsolete)=== * Run the appropriate command from the '''vdrift''' folder to generate the project files. ** Microsoft Visual C++ 2008: vdrift-win\premake4 vs2008 ** Microsoft Visual C++ 2010: vdrift-win\premake4 vs2010 </div></div> <div class="mw-collapsible mw-collapsed"> ==OS X== <div class="mw-collapsible-content"> The VDrift OS X project requires [http://developer.apple.com/xcode/ Xcode] 3.2 or later. The latest version is free on the [http://itunes.apple.com/us/app/xcode/id422352214?mt=12&ls=1 Mac App Store]. Open '''vdrift/vdrift-mac/vdrift.xcodeproj''' and in Xcode 4 or higher click Product -> Build, otherwise hit Build -> Build. </div></div> <div class="mw-collapsible mw-collapsed"> ==Linux== <div class="mw-collapsible-content"> ===Prerequisites=== The required build tools include: * [http://gcc.gnu.org/ g++] - The GNU C++ compiler * [http://scons.org/scons SCons] - A replacement for Make The required libraries include: * [http://bulletphysics.org/wordpress/ Bullet] - Open Source Physics Library (minimum version 2.83). Only the following libraries are required: ** BulletCollision ** BulletDynamics ** LinearMath * [http://curl.haxx.se/ libcurl] - Multiprotocol file transfer library (minimum version 7.21.6) * [http://xiph.org/vorbis/ libvorbis] - The Vorbis General Audio Compression Codec Library (minimum version 1.2.0) * [http://www.libsdl.org/ SDL] - Simple DirectMedia Layer Library (minimum version 2.0.0) * [http://www.libsdl.org/projects/SDL_image/ SDL_image] - Image file loading library (minimum version 2.0.0) Make sure you have all the required libraries and build tools. Make sure you also have the development files for each of the libraries. Your Linux distribution may have different package names and/or bundled differently. The list above should give enough information to search for applicable packages within your distribution's package manager. ====Fedora==== All required packages can be installed using this command: sudo yum install bullet-devel gcc-c++ libvorbis-devel scons SDL2-devel SDL2_image-devel curl-devel ====Ubuntu==== Ubuntu 12.04 does not include libbullet and SDL2 packages. They are available in following ppas though: sudo add-apt-repository ppa:roblib/ppa sudo add-apt-repository ppa:zoogie/sdl2-snapshots All required packages can be installed using this command: sudo apt-get install g++ scons libsdl2-dev libsdl2-image-dev libbullet-dev libvorbis-dev libcurl4-gnutls-dev ===Compiling=== To compile VDrift just run SCons in the root directory of the sources. scons ====Optional: Compile Options==== You can use one or more compile options. To compile with optimization for a certain platform, you can use the arch flag: scons arch=a64 Compiling VDrift in release mode will turn off debugging options, and enable more compiler optimizations. VDrift runs much more quickly in release mode: scons release=1 To enable force feedback, use this flag: scons force_feedback=1 You can get a list of all compile time options with: scons --help These options are probably best left off the first time you compile. If you have problems compiling or running VDrift, it is easier to debug with them off. Once you verify that VDrift is compiling, then recompile with these optimizations to improve performance. ===Installing=== VDrift does not need to be installed to work and you can run it from the folder where you compiled it. If you do want to install, use the SCons build target install. sudo scons install ====Optional: Installation Location==== There are also some install options - to change where VDrift is installed, use the prefix flag: scons install prefix=/usr/local ===Cleaning=== Building the project creates several artefacts that do not need to be stored, because they can be regenerated on demand. Cleaning them up can be done with SCons, too: scons --clean To remove all additional temporary files run: rm -rf .sconf_temp/ .sconsign.dblite config.log vdrift.conf </div></div> <div class="mw-collapsible mw-collapsed"> ==FreeBSD== <div class="mw-collapsible-content"> To compile VDrift on FreeBSD, use the ports system. ===Latest Release=== If you downloaded a release, simply run <code>make</code> on the '''vdrift''' port: cd /usr/ports/games/vdrift && make install clean clean-depends ===Development Version=== If you downloaded the development version, copy the '''vdrift''' and '''vdrift-data''' ports to '''vdrift-devel''' and '''vdrift-data-devel''': cd /usr/ports/games && cp -rf vdrift vdrift-devel && cp -rf vdrift-data vdrift-data-devel To compile, run <code>make</code> on the newly-created '''vdrift-devel''' port: cd /usr/ports/games/vdrift-devel && make install clean clean-depends </div></div> [[Category:Development]] 31352a92b7f1854cfb2bfd9f54880a4a29f3e176 Requirements 0 97 1334 1225 2015-06-24T18:42:46Z NaN 4 wikitext text/x-wiki VDrift has a high quality simulation engine and graphics so needs a fairly decent computer for it to run the best it can. The following hardware requirements are what can be reasonable expect to have no problems playing the game, but we don't have a comprehensive test suite so feel free to test VDrift on your own computer and tell us the results! ==Processor== VDrift requires a relatively fast CPU. A 2 GHz or better clock speed is recommended, although it should be possible to run VDrift with a 1 GHz or better CPU. ==Graphics== VDrift requires an OpenGL 2.0 capable graphics card, OpenGL 3.3 is recommended. A nVidia GeForce 8 Series or ATI Radeon HD 4800 Series card is recommended in order to enjoy all visual effects. By reducing or disabling some of the [[Configuring the display|display options]], it should be possible to play VDrift with a nVidia GeForce 6 or ATI Radeon 9000. You should install newest version of the device drivers for your graphics card. ==Memory== VDrift can consume about 300 MB of memory on a typical run so 512 MB is the minimum requirement but 1 GB or more is recommended, especially for larger tracks. ==Storage== The basic [[Downloading|release]] is usually about 650 MB, so you must have at least 700 MB free space before you begin, and more if you wish to add more cars or tracks. While the source code is less than 30 MB, if you [[Getting the development version|get the development version]] you will need at least 2.5 GB as the data repository is about 1.7 GB, you will need to download dependencies as well (up to 60 MB depending on your operating system), and space is needed for build files. You should also check you have enough bandwidth to download these amounts - some ISPs have download limits. ==Platforms== VDrift is known to compile on: * 32-bit x86 * 64-bit x86 * PowerPC ==Operating Systems== Ports for VDrift are available for these operating systems: * Windows * OS X (10.4 "Tiger" or higher required) * Linux * FreeBSD [[Category:Installation]] 11e9df5647ec8094e4b573c748439ed3860dd7a0